}
}
-static void handle_signal(int sig)
-{
- switch (sig) {
- case SIGINT:
- case SIGTERM:
- case SIGHUP:
- PARA_EMERG_LOG("terminating on signal %d\n", sig);
- clean_exit(EXIT_FAILURE, "caught deadly signal");
- return;
- }
-}
-
static void try_to_close_slot(int slot_num)
{
struct slot_info *s = &slot[slot_num];
{
struct signal_task *st = t->private_data;
- if (t->ret != -E_SIGNAL_CAUGHT)
- PARA_ERROR_LOG("%s (ignored)\n", PARA_STRERROR(-t->ret));
- else
- handle_signal(st->signum);
+ switch (st->signum) {
+ case SIGINT:
+ case SIGTERM:
+ case SIGHUP:
+ PARA_EMERG_LOG("terminating on signal %d\n", st->signum);
+ clean_exit(EXIT_FAILURE, "caught deadly signal");
+ }
}
static void signal_pre_select(struct sched *s, struct task *t)