]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2447] show the reason of the error when opening IPC lock file fails.
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 8 Nov 2012 07:40:37 +0000 (23:40 -0800)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 8 Nov 2012 08:31:44 +0000 (00:31 -0800)
src/lib/util/interprocess_sync_file.cc

index d045449025ce90adc3e60f7b3addc04285ea95b9..25af55cb372cd544b854bffeb628a803ac9e1c3d 100644 (file)
@@ -15,6 +15,8 @@
 #include "interprocess_sync_file.h"
 
 #include <string>
+#include <cerrno>
+#include <cstring>
 
 #include <stdlib.h>
 #include <string.h>
@@ -68,8 +70,8 @@ InterprocessSyncFile::do_lock(int cmd, short l_type) {
 
         if (fd_ == -1) {
             isc_throw(InterprocessSyncFileError,
-                      "Unable to use interprocess sync lockfile: " +
-                      lockfile_path);
+                      "Unable to use interprocess sync lockfile ("
+                      << std::strerror(errno) << "): " << lockfile_path);
         }
     }