fixed child exit handling and IP release handling
authorAndrew Tridgell <tridge@samba.org>
Fri, 8 Aug 2008 11:11:56 +0000 (21:11 +1000)
committerMichael Adam <obnox@samba.org>
Wed, 13 Aug 2008 09:54:12 +0000 (11:54 +0200)
(This used to be commit 6fe27d296c389473c24e8c627a61bd56b364ad9f)

source3/lib/ctdbd_conn.c
source3/smbd/server.c

index 5fc4b7ce1fdf0ffaa300fb5822f11fde747d66f0..1ae23bcf8270f482d65ccdb5698b3cfc8a70a5dc 100644 (file)
@@ -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
         */
index df6b6ae41dbcc601c6dba4607522b3a3f673d610..265d4927f58c9374799f191333c89078ff683879 100644 (file)
@@ -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);
        }
 }