we should close this file on exec
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 2 Oct 2009 03:41:54 +0000 (13:41 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Fri, 2 Oct 2009 03:46:48 +0000 (13:46 +1000)
server/eventscript.c

index a30ac3f961c86fcdfb4c3af1c8039734bf98a316..02b8bc3defe525ee975246b8c9ffad057325f192 100644 (file)
@@ -651,6 +651,7 @@ static int ctdb_event_script_callback_v(struct ctdb_context *ctdb,
        talloc_set_destructor(state, event_script_destructor);
 
        close(state->fd[1]);
+       set_close_on_exec(state->fd[0]);
 
        event_add_fd(ctdb->ev, state, state->fd[0], EVENT_FD_READ|EVENT_FD_AUTOCLOSE,
                     ctdb_event_script_handler, state);