From ec02facd13d9c03ec47fa02ad8da7ce826b34f8f Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Mon, 24 Apr 2023 15:25:45 -0400 Subject: allow FIGNORE suffixes to match entire pathnames; allow SIGINT received while a function is executing in a loop to break the loop --- jobs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'jobs.c') 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 -- cgit v1.2.1