diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-03-28 01:07:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-03-28 01:07:05 +0000 |
commit | 567fcd81ed7e8cda0640d100f501083632b130f3 (patch) | |
tree | cd4f337869fee545f3f86941d746636cd98b6f8c /source3 | |
parent | 9b212f8b5edf1c7a48cb13d633f8613fbd2f2a1b (diff) | |
download | samba-567fcd81ed7e8cda0640d100f501083632b130f3.tar.gz samba-567fcd81ed7e8cda0640d100f501083632b130f3.tar.bz2 samba-567fcd81ed7e8cda0640d100f501083632b130f3.zip |
merged real time signal fixes from head
(This used to be commit 03a5e62300f3cfb96d14570b73a758e6fa64c449)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/includes.h | 4 | ||||
-rw-r--r-- | source3/smbd/notify_kernel.c | 5 | ||||
-rw-r--r-- | source3/smbd/oplock_linux.c | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index bdd8661f6f..168256fd56 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -864,6 +864,10 @@ struct printjob; #define SIGCLD SIGCHLD #endif +#ifndef SIGRTMIN +#define SIGRTMIN 32 +#endif + #ifndef MAP_FILE #define MAP_FILE 0 #endif 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; } diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c index deed0c5107..84083dffc9 100644 --- a/source3/smbd/oplock_linux.c +++ b/source3/smbd/oplock_linux.c @@ -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; |