From: Chet Ramey Date: Sat, 13 Jan 2024 23:26:00 +0000 (-0500) Subject: Bash-5.2 patch 25: fix problem with subshells terminated by a signal exiting with... X-Git-Tag: bash-5.3-alpha~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0bec38a566a4dcbdb44e04b4f2ae310ac47e7ef6;p=thirdparty%2Fbash.git Bash-5.2 patch 25: fix problem with subshells terminated by a signal exiting with the wrong status --- diff --git a/execute_cmd.c b/execute_cmd.c index f2e3cf322..ed1063e6b 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -1725,6 +1725,9 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) return_code = (return_code == EXECUTION_SUCCESS) ? EXECUTION_FAILURE : EXECUTION_SUCCESS; + /* Check for terminating signals before we return to our caller, which we + expect to exit immediately anyway. */ + CHECK_TERMSIG; /* If we were explicitly placed in a subshell with (), we need to do the `shell cleanup' things, such as running traps[0]. */ diff --git a/patchlevel.h b/patchlevel.h index a88aa72e9..8c430b164 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 24 +#define PATCHLEVEL 25 #endif /* _PATCHLEVEL_H_ */