summaryrefslogtreecommitdiff
path: root/patches/nmbd-signalling.patch
blob: a39cde86f869369358d18ff4c1d63213a858c9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Goal: Unknown

Fixes: ?

Status wrt upstream: No apparent reason for not being forwarded upstream

Note: 

Index: samba-3.0.25a/source/nmbd/nmbd_subnetdb.c
===================================================================
--- samba-3.0.25a.orig/source/nmbd/nmbd_subnetdb.c	2007-05-26 07:45:40.136219349 +0200
+++ samba-3.0.25a/source/nmbd/nmbd_subnetdb.c	2007-05-26 07:46:31.104625382 +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();