summaryrefslogtreecommitdiff
path: root/jobs.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2023-04-24 15:25:45 -0400
committerChet Ramey <chet.ramey@case.edu>2023-04-24 15:25:45 -0400
commitec02facd13d9c03ec47fa02ad8da7ce826b34f8f (patch)
tree3dbb535c4f3d1eeb204f73e9eaf538626e89e9d4 /jobs.c
parentd052bd6fd99f76408f307cedd86d5a3de0184938 (diff)
downloadbash-ec02facd13d9c03ec47fa02ad8da7ce826b34f8f.tar.gz
allow FIGNORE suffixes to match entire pathnames; allow SIGINT received while a function is executing in a loop to break the loop
Diffstat (limited to 'jobs.c')
-rw-r--r--jobs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/jobs.c b/jobs.c
index 1e8955bd..a34fe2dd 100644
--- a/jobs.c
+++ b/jobs.c
@@ -3089,10 +3089,11 @@ if (job == NO_JOB)
WIFSIGNALED (s) && WTERMSIG (s) == SIGINT)
{
/* If SIGINT is not trapped and the shell is in a for, while,
- or until loop, act as if the shell received SIGINT as
- well, so the loop can be broken. This doesn't call the
- SIGINT signal handler; maybe it should. */
- if (signal_is_trapped (SIGINT) == 0 && (loop_level || (shell_compatibility_level > 32 && executing_list)))
+ until, or arithmetic for loop, or is executing a compound list,
+ act as if the shell received SIGINT as well, so the loop or
+ list can be broken. This doesn't call the SIGINT signal
+ handler; maybe it should. */
+ if (signal_is_trapped (SIGINT) == 0 && interrupt_execution)
ADDINTERRUPT;
/* Call any SIGINT trap handler if the shell is running a loop, so
the loop can be broken. This seems more useful and matches the