fixd a bug in the signal handling code - we could get phantom signals
authorAndrew Tridgell <tridge@samba.org>
Thu, 24 Jul 2008 01:48:27 +0000 (11:48 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 24 Jul 2008 01:48:27 +0000 (11:48 +1000)
(signum 64)

source/lib/events/events_signal.c

index 80a14acc117eff19d8a30309be8059994ff7b342..652df53d4b760a690479554d8ee7bf698feb07bc 100644 (file)
@@ -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;