[eric] build: a cancelled build reaps its whole process tree, so a killed run no longer orphans a 7za holding a 300MB archive for hours (ENG-247)

This commit is contained in:
ciregenz
2026-08-11 06:33:51 -07:00
parent 1215cfec50
commit a7c1a8256e
+6
View File
@@ -1,6 +1,12 @@
#!/bin/bash
set -euo pipefail
# Killing this build (Ctrl-C, or a parent that gets killed) used to orphan electron-builder's 7za
# child, which then sat for HOURS holding a ~300MB archive open (found one aged 20h). Run in our own
# process group and sweep it on any exit so a cancelled build takes its whole tree with it (ENG-247).
set -m
trap 'pkill -P $$ 2>/dev/null; kill -- -$$ 2>/dev/null' EXIT INT TERM
# Master build script for the OpenSwarm desktop app.
#
# Usage: