From: Andrew Tridgell Date: Fri, 8 Aug 2008 11:11:56 +0000 (+1000) Subject: fixed child exit handling and IP release handling X-Git-Tag: samba-3.3.0pre1~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6fe27d296c389473c24e8c627a61bd56b364ad9f;p=thirdparty%2Fsamba.git fixed child exit handling and IP release handling --- diff --git a/source/lib/ctdbd_conn.c b/source/lib/ctdbd_conn.c index 5fc4b7ce1fd..1ae23bcf827 100644 --- a/source/lib/ctdbd_conn.c +++ b/source/lib/ctdbd_conn.c @@ -1190,6 +1190,8 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn, */ SMB_ASSERT(conn->release_ip_handler == NULL); + conn->release_ip_handler = release_ip_handler; + /* * We want to be told about IP releases */ diff --git a/source/smbd/server.c b/source/smbd/server.c index df6b6ae41db..265d4927f58 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -986,7 +986,9 @@ static void release_ip(const char *ip, void *priv) away */ DEBUG(0,("Got release IP message for our IP %s - exiting immediately\n", ip)); - _exit(0); + /* note we must exit with non-zero status so the unclean handler gets + called in the parent, so that the brl database is tickled */ + _exit(1); } }