7 Bug-Reported-by: Martijn Dekker <martijn@inlv.org>
8 Bug-Reference-ID: <5326d6b9-2625-1d32-3e6e-ad1d15462c09@inlv.org>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00041.html
13 When sourcing a file from an interactive shell, setting the SIGINT handler
14 to the default and typing ^C will cause the shell to exit.
16 Patch (apply with `patch -p0'):
18 *** ../bash-4.4-patched/builtins/trap.def 2016-01-25 13:32:38.000000000 -0500
19 --- builtins/trap.def 2016-11-06 12:04:35.000000000 -0500
24 extern int posixly_correct, subshell_environment;
25 + extern int sourcelevel, running_trap;
32 set_signal_handler (SIGINT, sigint_sighandler);
33 + /* special cases for interactive == 0 */
34 + else if (interactive_shell && (sourcelevel||running_trap))
35 + set_signal_handler (SIGINT, sigint_sighandler);
37 set_signal_handler (SIGINT, termsig_sighandler);
38 *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
39 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
42 looks for to find the patch level (for the sccs version string). */
44 ! #define PATCHLEVEL 22
46 #endif /* _PATCHLEVEL_H_ */
48 looks for to find the patch level (for the sccs version string). */
50 ! #define PATCHLEVEL 23
52 #endif /* _PATCHLEVEL_H_ */