rename ctdb.h to ctdb_protocol.h
[sahlberg/ctdb.git] / server / ctdb_lockwait.c
index be3a0979d9d19b58082671b43dd90bcc1b520dec..5128a3e05ea04774b58d92bddd46b4e09bd452a5 100644 (file)
@@ -23,7 +23,8 @@
 #include "system/wait.h"
 #include "db_wrap.h"
 #include "lib/tdb/include/tdb.h"
-#include "../include/ctdb_private.h"
+#include "include/ctdb_protocol.h"
+#include "include/ctdb_private.h"
 
 
 struct lockwait_handle {
@@ -146,6 +147,10 @@ struct lockwait_handle *ctdb_lockwait(struct ctdb_db_context *ctdb_db,
        }
 
        close(result->fd[1]);
+       set_close_on_exec(result->fd[0]);
+
+       DEBUG(DEBUG_DEBUG, (__location__ " Created PIPE FD:%d to child lockwait process\n", result->fd[0]));
+
        talloc_set_destructor(result, lockwait_destructor);
 
        result->fde = event_add_fd(ctdb_db->ctdb->ev, result, result->fd[0],