#3494 PR merged
: BugError when AddExitTask QuietAddExitTask RemoveExitTask are called in subshell¶
Labels: bug
, fixed / solved / done
jsmeix opened issue at 2025-07-09 15:18:¶
-
Type: Bug Fix
-
Impact: Normal
-
Reference to related issue (URL):
https://github.com/rear/rear/pull/3490#issuecomment-3049047773 -
How was this pull request tested?
see
https://github.com/rear/rear/pull/3490#issuecomment-3053147895 -
Description of the changes in this pull request:
In lib/_framework-setup-and-functions.sh
BugError when the functions
AddExitTask
QuietAddExitTask
RemoveExitTask
are called in a subshell because
changing the EXIT_TASKS array in a subshell
has no effect in the main shell (i.e. the process with $MASTER_PID)
where the EXIT_TASKS array will be used to run the exit tasks.
jsmeix commented at 2025-07-10 06:59:¶
@rear/contributors
I would like to merge it tomorrow afternoon
unless there are severe objections.
Perhaps a solution so that
AddExitTask
QuietAddExitTask
RemoveExitTask
can also be called in a subshell could be
to use a file instead of an (array) variable
to store the exit tasks commands.
But this would belong to a separated pull request.
[Export of Github issue for rear/rear.]