diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-10-15 11:24:54 +1100 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-10-15 11:24:54 +1100 |
commit | 9de365238076601f4e0f776321c0c69d8c15f3dc (patch) | |
tree | 94ec50b8a83dd14609d09fba924b77f3138a15d6 /ctdb/server/ctdb_recover.c | |
parent | 6152a7060bf007ee6f8fea66ee921ff963bd826b (diff) | |
download | samba-9de365238076601f4e0f776321c0c69d8c15f3dc.tar.gz samba-9de365238076601f4e0f776321c0c69d8c15f3dc.tar.xz samba-9de365238076601f4e0f776321c0c69d8c15f3dc.zip |
add logging everytime we create a filedescriptor in the main ctdb daemon
so we can spot if there are leaks.
plug two leaks for filedescriptors related to when sending ARP fail
and one leak when we can not parse the local address during tcp connection establish
(This used to be ctdb commit ddd089810a14efe4be6e1ff3eccaa604e4913c9e)
Diffstat (limited to 'ctdb/server/ctdb_recover.c')
-rw-r--r-- | ctdb/server/ctdb_recover.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c index 21dc28d05d..862168e97e 100644 --- a/ctdb/server/ctdb_recover.c +++ b/ctdb/server/ctdb_recover.c @@ -736,10 +736,14 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb, _exit(0); } close(state->fd[1]); + set_close_on_exec(state->fd[0]); + state->fd[1] = -1; talloc_set_destructor(state, set_recmode_destructor); + DEBUG(DEBUG_NOTICE, (__location__ " Created PIPE FD:%d for setrecmode\n", state->fd[0])); + state->te = event_add_timed(ctdb->ev, state, timeval_current_ofs(5, 0), ctdb_set_recmode_timeout, state); |