diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-14 16:07:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-14 16:07:49 +0300 |
| commit | 57d05cb23238c93d450a871d4115abf7de9b7645 (patch) | |
| tree | 9d2637043440fb07b18168ba184fe6495d2e08fb /src/lib/bootstrap.source.sh | |
| parent | fe4e83cd5159809a70f24301fcabc08779b51706 (diff) | |
6m0 re-raise interrupt to $BASHPID, not $$, in render subshell
The signal handler in source_template_file re-raised the caught signal
with `kill -s $sig $$`. Because the function commonly runs inside
backgrounded render subshells (queue_album_view_render_job), $$ expands
to the main shuriken PID, not the subshell's own. On interrupt the
handler therefore signalled the main shell -- which had already cleared
its own staging traps -- killing it mid-cleanup (leaking the staging
dir) instead of terminating just the render subshell.
Re-raise to $BASHPID, the current (sub)shell's real PID, which equals $$
in the foreground case so it is correct everywhere. Extend
test_template_interrupt_removes_context_file to run the render in a
backgrounded subshell and assert the parent shell survives the re-raise;
verified it fails against a $$-based build and passes with $BASHPID.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/bootstrap.source.sh')
0 files changed, 0 insertions, 0 deletions
