summaryrefslogtreecommitdiffstats
path: root/source/namepacket.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/namepacket.c')
-rw-r--r--source/namepacket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/namepacket.c b/source/namepacket.c
index 31cad927911..418155bbd85 100644
--- a/source/namepacket.c
+++ b/source/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))
{