diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:13:32 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-09 16:15:01 -0700 |
commit | 2d698b6e42d8dca191ac795ef5dba3bf62496eec (patch) | |
tree | ac5e0b67043c50f49160e9fe407435706cf30444 /nojobs.c | |
parent | f1250933e4a2ac09a3d0b25b3877068e12f44da5 (diff) | |
download | vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.tar.gz vyatta-bash-2d698b6e42d8dca191ac795ef5dba3bf62496eec.zip |
Integrate bash 3.2 version
This is merge of current Debian stable (Lenny) version of Bash
with Vyatta changes.
Diffstat (limited to 'nojobs.c')
-rw-r--r-- | nojobs.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,7 +3,7 @@ /* This file works under BSD, System V, minix, and Posix systems. It does not implement job control. */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -429,9 +429,11 @@ reap_zombie_children () pid_t pid; WAIT status; + CHECK_TERMSIG; while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0) set_pid_status (pid, status); # endif /* WNOHANG */ + CHECK_TERMSIG; } #endif /* WAITPID */ @@ -584,6 +586,7 @@ wait_for_single_pid (pid) siginterrupt (SIGINT, 1); while ((got_pid = WAITPID (pid, &status, 0)) != pid) { + CHECK_TERMSIG; if (got_pid < 0) { if (errno != EINTR && errno != ECHILD) @@ -737,6 +740,7 @@ wait_for (pid) while ((got_pid = WAITPID (-1, &status, 0)) != pid) /* XXX was pid now -1 */ { + CHECK_TERMSIG; if (got_pid < 0 && errno == ECHILD) { #if !defined (_POSIX_VERSION) @@ -775,7 +779,7 @@ wait_for (pid) if (maybe_call_trap_handler (SIGINT) == 0) { if (temp_handler == SIG_DFL) - termination_unwind_protect (SIGINT); + termsig_handler (SIGINT); else if (temp_handler != INVALID_SIGNAL_HANDLER && temp_handler != SIG_IGN) (*temp_handler) (SIGINT); } |