diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-07-03 05:15:23 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-07-03 05:15:23 +0000 |
commit | 5222d31a15bce9d86b2d2781f75006f18df22865 (patch) | |
tree | 29cb674d7d16597c459799c118297a1bd6222257 | |
parent | 549df2ebc387b84914417b3f3742105f09f39130 (diff) | |
download | busybox-w32-5222d31a15bce9d86b2d2781f75006f18df22865.tar.gz busybox-w32-5222d31a15bce9d86b2d2781f75006f18df22865.tar.bz2 busybox-w32-5222d31a15bce9d86b2d2781f75006f18df22865.zip |
Patch from till busch <buti@gmx.at> -- unblock all signals
in exec_signal() before calling exec()
-rw-r--r-- | init/init.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c index f109c4ea5..e4812538d 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -758,10 +758,26 @@ static void shutdown_system(void) | |||
758 | static void exec_signal(int sig) | 758 | static void exec_signal(int sig) |
759 | { | 759 | { |
760 | struct init_action *a, *tmp; | 760 | struct init_action *a, *tmp; |
761 | sigset_t unblock_signals; | ||
762 | |||
761 | for (a = init_action_list; a; a = tmp) { | 763 | for (a = init_action_list; a; a = tmp) { |
762 | tmp = a->next; | 764 | tmp = a->next; |
763 | if (a->action & RESTART) { | 765 | if (a->action & RESTART) { |
764 | shutdown_system(); | 766 | shutdown_system(); |
767 | |||
768 | /* unblock all signals, blocked in shutdown_system() */ | ||
769 | sigemptyset(&unblock_signals); | ||
770 | sigaddset(&unblock_signals, SIGHUP); | ||
771 | sigaddset(&unblock_signals, SIGCHLD); | ||
772 | sigaddset(&unblock_signals, SIGUSR1); | ||
773 | sigaddset(&unblock_signals, SIGUSR2); | ||
774 | sigaddset(&unblock_signals, SIGINT); | ||
775 | sigaddset(&unblock_signals, SIGTERM); | ||
776 | sigaddset(&unblock_signals, SIGCONT); | ||
777 | sigaddset(&unblock_signals, SIGSTOP); | ||
778 | sigaddset(&unblock_signals, SIGTSTP); | ||
779 | sigprocmask(SIG_UNBLOCK, &unblock_signals, NULL); | ||
780 | |||
765 | message(CONSOLE|LOG, "\rTrying to re-exec %s\n", a->command); | 781 | message(CONSOLE|LOG, "\rTrying to re-exec %s\n", a->command); |
766 | execl(a->command, a->command, NULL); | 782 | execl(a->command, a->command, NULL); |
767 | 783 | ||