svn:r32
This commit is contained in:
Niels Provos 2002-09-15 18:52:28 +00:00
parent eb15f4d866
commit e0ca1ef203

View File

@ -60,6 +60,7 @@ extern struct event_list signalqueue;
#endif #endif
short evsigcaught[NSIG]; short evsigcaught[NSIG];
volatile sig_atomic_t signal_caught = 0;
struct selectop { struct selectop {
int event_fds; /* Highest fd in fd set */ int event_fds; /* Highest fd in fd set */
@ -180,7 +181,8 @@ select_dispatch(void *arg, struct timeval *tv)
signal_process(); signal_process();
return (0); return (0);
} } else if (signal_caught)
signal_process();
LOG_DBG((LOG_MISC, 80, __FUNCTION__": select reports %d", LOG_DBG((LOG_MISC, 80, __FUNCTION__": select reports %d",
res)); res));
@ -260,6 +262,7 @@ static void
signal_handler(int sig) signal_handler(int sig)
{ {
evsigcaught[sig]++; evsigcaught[sig]++;
signal_caught = 1;
} }
int int
@ -307,5 +310,6 @@ signal_process(void)
} }
memset(evsigcaught, 0, sizeof(evsigcaught)); memset(evsigcaught, 0, sizeof(evsigcaught));
signal_caught = 0;
} }