bash44-016 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.4
  4. Patch-ID: bash44-016
  5. Bug-Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
  6. Bug-Reference-ID: <CAJq09z7G1-QnLyiUQA0DS=V3da_rtHF8VdYbbdzPe_W3kydpRg@mail.gmail.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00092.html
  8. Bug-Description:
  9. Bash can perform trap processing while reading command substitution output
  10. instead of waiting until the command completes.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-4.4/lib/sh/zread.c 2014-12-22 10:48:04.000000000 -0500
  13. --- lib/sh/zread.c 2016-09-29 15:21:36.000000000 -0400
  14. ***************
  15. *** 38,42 ****
  16. --- 38,45 ----
  17. #endif
  18. + extern int executing_builtin;
  19. +
  20. extern void check_signals_and_traps (void);
  21. + extern void check_signals (void);
  22. extern int signal_is_trapped (int);
  23. ***************
  24. *** 51,69 ****
  25. ssize_t r;
  26. - #if 0
  27. - #if defined (HAVE_SIGINTERRUPT)
  28. - if (signal_is_trapped (SIGCHLD))
  29. - siginterrupt (SIGCHLD, 1);
  30. - #endif
  31. - #endif
  32. -
  33. while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
  34. ! check_signals_and_traps (); /* XXX - should it be check_signals()? */
  35. !
  36. ! #if 0
  37. ! #if defined (HAVE_SIGINTERRUPT)
  38. ! siginterrupt (SIGCHLD, 0);
  39. ! #endif
  40. ! #endif
  41. return r;
  42. --- 54,64 ----
  43. ssize_t r;
  44. while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
  45. ! /* XXX - bash-5.0 */
  46. ! /* We check executing_builtin and run traps here for backwards compatibility */
  47. ! if (executing_builtin)
  48. ! check_signals_and_traps (); /* XXX - should it be check_signals()? */
  49. ! else
  50. ! check_signals ();
  51. return r;
  52. *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  53. --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  54. ***************
  55. *** 26,30 ****
  56. looks for to find the patch level (for the sccs version string). */
  57. ! #define PATCHLEVEL 15
  58. #endif /* _PATCHLEVEL_H_ */
  59. --- 26,30 ----
  60. looks for to find the patch level (for the sccs version string). */
  61. ! #define PATCHLEVEL 16
  62. #endif /* _PATCHLEVEL_H_ */