1
0

132-upstream-bash43-032.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-032
  5. Bug-Reported-by: crispusfairbairn@gmail.com
  6. Bug-Reference-ID: <b5e499f7-3b98-408d-9f94-c0387580e73a@googlegroups.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00013.html
  8. Bug-Description:
  9. When bash is running in Posix mode, it allows signals -- including SIGCHLD --
  10. to interrupt the `wait' builtin, as Posix requires. However, the interrupt
  11. causes bash to not run a SIGCHLD trap for all exited children. This patch
  12. fixes the issue and restores the documented behavior in Posix mode.
  13. Patch (apply with `patch -p0'):
  14. --- a/jobs.c
  15. +++ b/jobs.c
  16. @@ -3339,7 +3339,9 @@ itrace("waitchld: waitpid returns %d blo
  17. if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
  18. {
  19. interrupt_immediately = 0;
  20. - trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
  21. + /* This was trap_handler (SIGCHLD) but that can lose traps if
  22. + children_exited > 1 */
  23. + queue_sigchld_trap (children_exited);
  24. wait_signal_received = SIGCHLD;
  25. /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up;
  26. run_pending_traps will call run_sigchld_trap later */
  27. --- a/patchlevel.h
  28. +++ b/patchlevel.h
  29. @@ -25,6 +25,6 @@
  30. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  31. looks for to find the patch level (for the sccs version string). */
  32. -#define PATCHLEVEL 31
  33. +#define PATCHLEVEL 32
  34. #endif /* _PATCHLEVEL_H_ */