summaryrefslogtreecommitdiff
path: root/debian/patches/nmbd-signalling.patch
blob: 3697c44345009962a37b5d92218ce5edf4429c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Index: samba-3.0.23c/source/nmbd/nmbd_subnetdb.c
===================================================================
--- samba-3.0.23c.orig/source/nmbd/nmbd_subnetdb.c	2006-09-02 10:08:46.896566329 +0200
+++ samba-3.0.23c/source/nmbd/nmbd_subnetdb.c	2006-09-02 10:09:20.660839154 +0200
@@ -185,12 +185,16 @@
 	struct in_addr unicast_ip, ipzero;
 
 	if(num_interfaces == 0) {
+		void (*old_handler)(int);
+
 		DEBUG(0,("create_subnets: No local interfaces !\n"));
 		DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
+		old_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL );
 		while (iface_count() == 0) {
 			sleep(5);
 			load_interfaces();
 		}
+		CatchSignal( SIGTERM, SIGNAL_CAST old_handler );
 	}
 
 	num_interfaces = iface_count();