#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:

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.]