7 Bug-Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
8 Bug-Reference-ID: <CAJq09z7G1-QnLyiUQA0DS=V3da_rtHF8VdYbbdzPe_W3kydpRg@mail.gmail.com>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00092.html
13 Bash can perform trap processing while reading command substitution output
14 instead of waiting until the command completes.
16 Patch (apply with `patch -p0'):
18 *** ../bash-4.4/lib/sh/zread.c 2014-12-22 10:48:04.000000000 -0500
19 --- lib/sh/zread.c 2016-09-29 15:21:36.000000000 -0400
25 + extern int executing_builtin;
27 extern void check_signals_and_traps (void);
28 + extern void check_signals (void);
29 extern int signal_is_trapped (int);
36 - #if defined (HAVE_SIGINTERRUPT)
37 - if (signal_is_trapped (SIGCHLD))
38 - siginterrupt (SIGCHLD, 1);
42 while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
43 ! check_signals_and_traps (); /* XXX - should it be check_signals()? */
46 ! #if defined (HAVE_SIGINTERRUPT)
47 ! siginterrupt (SIGCHLD, 0);
55 while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
56 ! /* XXX - bash-5.0 */
57 ! /* We check executing_builtin and run traps here for backwards compatibility */
58 ! if (executing_builtin)
59 ! check_signals_and_traps (); /* XXX - should it be check_signals()? */
64 *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
65 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
68 looks for to find the patch level (for the sccs version string). */
70 ! #define PATCHLEVEL 15
72 #endif /* _PATCHLEVEL_H_ */
74 looks for to find the patch level (for the sccs version string). */
76 ! #define PATCHLEVEL 16
78 #endif /* _PATCHLEVEL_H_ */