diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-28 06:26:41 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-28 06:26:41 +0000 |
commit | 4b68935a519955f7cda9b874220fdbd037a5b0c0 (patch) | |
tree | d11711e84c1eb4515d32cc77f34895f45521135e | |
parent | ed9a219c8719063898c9b39ade0ba1b10739db98 (diff) | |
download | samba-4b68935a519955f7cda9b874220fdbd037a5b0c0.tar.gz samba-4b68935a519955f7cda9b874220fdbd037a5b0c0.tar.bz2 samba-4b68935a519955f7cda9b874220fdbd037a5b0c0.zip |
make sure async dns nmbd child dies
samba-patches 898
(This used to be commit a954f72fe315ec59bfeb4bd407179bc54689440f)
-rw-r--r-- | source3/nmbd/asyncdns.c | 1 | ||||
-rw-r--r-- | source3/nmbd/nmbd.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c index 6c2f8de3b1..c86ee69a09 100644 --- a/source3/nmbd/asyncdns.c +++ b/source3/nmbd/asyncdns.c @@ -122,6 +122,7 @@ void kill_async_dns_child(void) { if (child_pid > 0) { kill(child_pid, SIGTERM); + child_pid = -1; } } diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index d30efb550c..3a0dabe8d7 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -861,8 +861,10 @@ static void usage(char *pname) DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) ); - if ( !open_sockets( is_daemon, global_nmb_port ) ) + if ( !open_sockets( is_daemon, global_nmb_port ) ) { + kill_async_dns_child(); return 1; + } /* Determine all the IP addresses we have. */ load_interfaces(); @@ -871,6 +873,7 @@ static void usage(char *pname) if( False == create_subnets() ) { DEBUG(0,("ERROR: Failed when creating subnet lists. Exiting.\n")); + kill_async_dns_child(); exit(1); } @@ -882,6 +885,7 @@ static void usage(char *pname) if( !initialise_wins() ) { DEBUG( 0, ( "nmbd: Failed when initialising WINS server.\n" ) ); + kill_async_dns_child(); exit(1); } @@ -896,6 +900,7 @@ static void usage(char *pname) if( False == register_my_workgroup_and_names() ) { DEBUG(0,("ERROR: Failed when creating my my workgroup. Exiting.\n")); + kill_async_dns_child(); exit(1); } @@ -906,5 +911,6 @@ static void usage(char *pname) if (dbf) x_fclose(dbf); + kill_async_dns_child(); return(0); } |