ab186ff5c26c61669f73eea1f63be34c0847ab6c
[samba] / debian / patches / nmbd-signalling.patch
1 Index: samba-3.0.21c/source/nmbd/nmbd_subnetdb.c
2 ===================================================================
3 --- samba-3.0.21c.orig/source/nmbd/nmbd_subnetdb.c      2006-02-25 11:57:10.924494109 +0100
4 +++ samba-3.0.21c/source/nmbd/nmbd_subnetdb.c   2006-02-25 11:58:19.605636501 +0100
5 @@ -214,12 +214,16 @@
6         struct in_addr unicast_ip, ipzero;
7  
8         if(num_interfaces == 0) {
9 +               void (*old_handler)(int);
10 +
11                 DEBUG(0,("create_subnets: No local interfaces !\n"));
12                 DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
13 +               old_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL );
14                 while (iface_count() == 0) {
15                         sleep(5);
16                         load_interfaces();
17                 }
18 +               CatchSignal( SIGTERM, SIGNAL_CAST old_handler );
19         }
20  
21         num_interfaces = iface_count();