2 * Catching of signals and calling callback functions
4 * (c) 2004, Robert Spalek <robert@ucw.cz>
13 sh_sighandler_t signal_handler[_NSIG];
16 signal_handler_internal(int sig)
18 if (signal_handler[sig])
20 if (!signal_handler[sig](sig))
27 handle_signal(int signum, struct sigaction *oldact)
30 bzero(&act, sizeof(act));
31 act.sa_handler = signal_handler_internal;
32 if (sigaction(signum, &act, oldact) < 0)