summaryrefslogtreecommitdiff
path: root/source3/smbd/notify_kernel.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-03-28 01:05:32 +0000
committerAndrew Tridgell <tridge@samba.org>2003-03-28 01:05:32 +0000
commit893cbb759268bb114dcb873fef9f588eaad5263c (patch)
tree38806638f626c0f52a7a6e4aec516115460028e9 /source3/smbd/notify_kernel.c
parent0e1ad952fbb3dca19d7b28f97f5c8655212ea07b (diff)
downloadsamba-893cbb759268bb114dcb873fef9f588eaad5263c.tar.gz
samba-893cbb759268bb114dcb873fef9f588eaad5263c.tar.bz2
samba-893cbb759268bb114dcb873fef9f588eaad5263c.zip
it is possible for some of the real time signals to be used by glibc,
which then changes SIGRTMIN. It is also possible for bash to leave some real time signals blocked at startup. This fixes both problems. (This used to be commit 8d45bf644aecb6993c2a82b86a4527b33029ed8f)
Diffstat (limited to 'source3/smbd/notify_kernel.c')
-rw-r--r--source3/smbd/notify_kernel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c
index 8b7ff21ecb..efe93de5af 100644
--- a/source3/smbd/notify_kernel.c
+++ b/source3/smbd/notify_kernel.c
@@ -39,7 +39,7 @@ static SIG_ATOMIC_T signals_received;
#ifndef RT_SIGNAL_NOTIFY
-#define RT_SIGNAL_NOTIFY 34
+#define RT_SIGNAL_NOTIFY (SIGRTMIN+2)
#endif
#ifndef F_SETSIG
@@ -233,6 +233,9 @@ struct cnotify_fns *kernel_notify_init(void)
cnotify.remove_notify = kernel_remove_notify;
cnotify.select_time = -1;
+ /* the signal can start off blocked due to a bug in bash */
+ BlockSignals(False, RT_SIGNAL_NOTIFY);
+
return &cnotify;
}