From: Andrew Tridgell Date: Thu, 24 Jul 2008 01:48:27 +0000 (+1000) Subject: fixd a bug in the signal handling code - we could get phantom signals X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=af7fb2e38ba27cf8058eb1cef1f96bbc7b19849f fixd a bug in the signal handling code - we could get phantom signals (signum 64) --- diff --git a/source/lib/events/events_signal.c b/source/lib/events/events_signal.c index 80a14acc117..652df53d4b7 100644 --- a/source/lib/events/events_signal.c +++ b/source/lib/events/events_signal.c @@ -46,15 +46,15 @@ struct sigcounter { the poor design of signals means that this table must be static global */ static struct sig_state { - struct signal_event *sig_handlers[NUM_SIGNALS]; - struct sigaction *oldact[NUM_SIGNALS]; - struct sigcounter signal_count[NUM_SIGNALS]; + struct signal_event *sig_handlers[NUM_SIGNALS+1]; + struct sigaction *oldact[NUM_SIGNALS+1]; + struct sigcounter signal_count[NUM_SIGNALS+1]; struct sigcounter got_signal; int pipe_hack[2]; #ifdef SA_SIGINFO /* with SA_SIGINFO we get quite a lot of info per signal */ - siginfo_t *sig_info[NUM_SIGNALS]; - struct sigcounter sig_blocked[NUM_SIGNALS]; + siginfo_t *sig_info[NUM_SIGNALS+1]; + struct sigcounter sig_blocked[NUM_SIGNALS+1]; #endif } *sig_state;