aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 08:29:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 08:29:08 +0000
commit3f165fa5b3b38fa4b321be94a97f06927f636fb1 (patch)
treed5e2d1045e714823c2e9a3ef912dcafeffcc9ebd /shell
parent8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21 (diff)
downloadbusybox-w32-3f165fa5b3b38fa4b321be94a97f06927f636fb1.tar.gz
busybox-w32-3f165fa5b3b38fa4b321be94a97f06927f636fb1.tar.bz2
busybox-w32-3f165fa5b3b38fa4b321be94a97f06927f636fb1.zip
libbb: introduce and use sigprocmask_allsigs and sigaction_set.
libbb: rename sig_pause to wait_for_any_sig.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
-rw-r--r--shell/hush.c5
2 files changed, 2 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 6f675ce69..069909118 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -273,13 +273,11 @@ static void
273raise_interrupt(void) 273raise_interrupt(void)
274{ 274{
275 int i; 275 int i;
276 sigset_t mask;
277 276
278 intpending = 0; 277 intpending = 0;
279 /* Signal is not automatically unmasked after it is raised, 278 /* Signal is not automatically unmasked after it is raised,
280 * do it ourself - unmask all signals */ 279 * do it ourself - unmask all signals */
281 sigemptyset(&mask); 280 sigprocmask_allsigs(SIG_UNBLOCK);
282 sigprocmask(SIG_SETMASK, &mask, NULL);
283 /* pendingsig = 0; - now done in onsig() */ 281 /* pendingsig = 0; - now done in onsig() */
284 282
285 i = EXSIG; 283 i = EXSIG;
diff --git a/shell/hush.c b/shell/hush.c
index baa2db780..c61607dd3 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -788,11 +788,8 @@ static void handler_ctrl_z(int sig)
788static void sigexit(int sig) ATTRIBUTE_NORETURN; 788static void sigexit(int sig) ATTRIBUTE_NORETURN;
789static void sigexit(int sig) 789static void sigexit(int sig)
790{ 790{
791 sigset_t block_all;
792
793 /* Disable all signals: job control, SIGPIPE, etc. */ 791 /* Disable all signals: job control, SIGPIPE, etc. */
794 sigfillset(&block_all); 792 sigprocmask_allsigs(SIG_BLOCK);
795 sigprocmask(SIG_SETMASK, &block_all, NULL);
796 793
797 if (interactive_fd) 794 if (interactive_fd)
798 tcsetpgrp(interactive_fd, saved_tty_pgrp); 795 tcsetpgrp(interactive_fd, saved_tty_pgrp);