diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-03 21:16:45 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-03 21:16:45 +0000 |
commit | e0755e58ca07ce6a66aa184b5fb4b10b6950fd02 (patch) | |
tree | 0a8d98042ed6e5c2156ffc5a439de2c9b7dd2973 /shell | |
parent | cc8289dc0498d50734770d06601756f7ddc55168 (diff) | |
download | busybox-w32-e0755e58ca07ce6a66aa184b5fb4b10b6950fd02.tar.gz busybox-w32-e0755e58ca07ce6a66aa184b5fb4b10b6950fd02.tar.bz2 busybox-w32-e0755e58ca07ce6a66aa184b5fb4b10b6950fd02.zip |
hush: yet another randomconfig fix
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/shell/hush.c b/shell/hush.c index 64c1d3dd6..c8bcf9b59 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -994,22 +994,12 @@ static void set_fatal_signals_to_sigexit(void) | |||
994 | /*maybe_set_sighandler(SIGTERM);*/ | 994 | /*maybe_set_sighandler(SIGTERM);*/ |
995 | /*maybe_set_sighandler(SIGINT );*/ | 995 | /*maybe_set_sighandler(SIGINT );*/ |
996 | } | 996 | } |
997 | /* Used only to suppress ^Z in `cmd` */ | ||
998 | static void set_jobctrl_signals_to_IGN(void) | ||
999 | { | ||
1000 | bb_signals(0 | ||
1001 | + (1 << SIGTSTP) | ||
1002 | + (1 << SIGTTIN) | ||
1003 | + (1 << SIGTTOU) | ||
1004 | , SIG_IGN); | ||
1005 | } | ||
1006 | 997 | ||
1007 | #else /* !JOB */ | 998 | #else /* !JOB */ |
1008 | 999 | ||
1009 | #define set_fatal_signals_to_sigexit(handler) ((void)0) | 1000 | #define set_fatal_signals_to_sigexit(handler) ((void)0) |
1010 | #define set_jobctrl_signals_to_IGN(handler) ((void)0) | ||
1011 | 1001 | ||
1012 | #endif /* JOB */ | 1002 | #endif |
1013 | 1003 | ||
1014 | /* Restores tty foreground process group, and exits. */ | 1004 | /* Restores tty foreground process group, and exits. */ |
1015 | static void hush_exit(int exitcode) NORETURN; | 1005 | static void hush_exit(int exitcode) NORETURN; |
@@ -3754,7 +3744,11 @@ static FILE *generate_stream_from_list(struct pipe *head) | |||
3754 | * 'command execution'. | 3744 | * 'command execution'. |
3755 | * SUSv3 says ctrl-Z should be ignored, ctrl-C should not. | 3745 | * SUSv3 says ctrl-Z should be ignored, ctrl-C should not. |
3756 | */ | 3746 | */ |
3757 | set_jobctrl_signals_to_IGN(); | 3747 | bb_signals(0 |
3748 | + (1 << SIGTSTP) | ||
3749 | + (1 << SIGTTIN) | ||
3750 | + (1 << SIGTTOU) | ||
3751 | , SIG_IGN); | ||
3758 | 3752 | ||
3759 | /* Note: freeing 'head' here would break NOMMU. */ | 3753 | /* Note: freeing 'head' here would break NOMMU. */ |
3760 | _exit(run_list(head)); | 3754 | _exit(run_list(head)); |