summaryrefslogtreecommitdiff
path: root/source3/namepacket.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-05-31 01:11:40 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-05-31 01:11:40 +0000
commitd98bea900ee694cdba83149620c65bd7f8765f26 (patch)
tree23d2ee7a6fc586dbfbbc2961c3214455f645cc61 /source3/namepacket.c
parent5c4776f496d814b0ab5b75b5d029dc0998236365 (diff)
downloadsamba-d98bea900ee694cdba83149620c65bd7f8765f26.tar.gz
samba-d98bea900ee694cdba83149620c65bd7f8765f26.tar.bz2
samba-d98bea900ee694cdba83149620c65bd7f8765f26.zip
namepacket.c: Block SIGTERM correctly - we can only take them at defined points.
nameserv.c: Fixup name release code - used when we are going down. nameservreply.c: Relaxed check for deleting name - original code never deleted. nmbd.c: Block SIGTERM signals most of the time - see comment on namepacket above. Jeremy (jallison@whistle.com) (This used to be commit 9f4e01224751134c2f7701e2aea87d06a79d77a4)
Diffstat (limited to 'source3/namepacket.c')
-rw-r--r--source3/namepacket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/namepacket.c b/source3/namepacket.c
index 31cad92791..418155bbd8 100644
--- a/source3/namepacket.c
+++ b/source3/namepacket.c
@@ -522,7 +522,10 @@ void listen_for_packets(BOOL run_election)
timeout.tv_sec = (run_election||num_response_packets) ? 1:NMBD_SELECT_LOOP;
timeout.tv_usec = 0;
+ /* We can only take term signals when we are in the select. */
+ BlockSignals(False, SIGTERM);
selrtn = sys_select(&fds,&timeout);
+ BlockSignals(True, SIGTERM);
if (FD_ISSET(ClientNMB,&fds))
{