mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-27 20:14:49 +02:00
[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user