merged real time signal fixes from head
authorAndrew Tridgell <tridge@samba.org>
Fri, 28 Mar 2003 01:07:05 +0000 (01:07 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 28 Mar 2003 01:07:05 +0000 (01:07 +0000)
(This used to be commit 03a5e62300f3cfb96d14570b73a758e6fa64c449)

source3/include/includes.h
source3/smbd/notify_kernel.c
source3/smbd/oplock_linux.c

index bdd8661f6f201fe7c41a3fa3b6e9f9f2f305bd39..168256fd56768cecccb577264f2dd23806a9755e 100644 (file)
@@ -864,6 +864,10 @@ struct printjob;
 #define SIGCLD SIGCHLD
 #endif
 
+#ifndef SIGRTMIN
+#define SIGRTMIN 32
+#endif
+
 #ifndef MAP_FILE
 #define MAP_FILE 0
 #endif
index 8b7ff21ecb944e6848e677d2c127437fe43e8d4b..efe93de5afb056d35b2d7ecae739d9245ec903b2 100644 (file)
@@ -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;
 }
 
index deed0c51073af1d584a347004445ecb66d464662..84083dffc974f198e45ae71da4e95888f4941e7c 100644 (file)
@@ -39,7 +39,7 @@ static SIG_ATOMIC_T fd_pending_array[FD_PENDING_SIZE];
 #endif
 
 #ifndef RT_SIGNAL_LEASE
-#define RT_SIGNAL_LEASE 33
+#define RT_SIGNAL_LEASE (SIGRTMIN+1)
 #endif
 
 #ifndef F_SETSIG
@@ -296,6 +296,9 @@ struct kernel_oplocks *linux_init_kernel_oplocks(void)
        koplocks.msg_waiting = linux_oplock_msg_waiting;
        koplocks.notification_fd = -1;
 
+       /* the signal can start off blocked due to a bug in bash */
+       BlockSignals(False, RT_SIGNAL_LEASE);
+
        DEBUG(3,("Linux kernel oplocks enabled\n"));
 
        return &koplocks;