(via norrietaylor): Fix trap handlers to prevent orphaning background processes in bulk-uplo - #891
Merged
macroscopeapp[bot] merged 1 commit intoJul 22, 2026
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
macroscopeapp
Bot
merged commit Jul 22, 2026
a827cb4
into
test/bulk-upload-canary-869
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a process management issue in
bulk-upload-e2e.shwhere background processes could be orphaned when the script exits unexpectedly (e.g., via signal or timeout).Changes
CUR_PIDglobal variable to track the currently running background processcleanup_child()function that kills the tracked background process if it existscleanup_childbefore teardownrun_deadline()to:CUR_PID=$pidafter spawning the background processCUR_PIDbefore both return paths (success and timeout)Why
Previously, if the script was interrupted or hit a timeout, background processes spawned by
run_deadline()could continue running as orphans. This fix ensures proper cleanup by tracking and terminating any active background process when the script exits.Note
Macroscope: Fix It For Me
Activity
Currently: Auto-merged a827cb4
Previously
Note
Fix trap handlers in bulk-upload e2e script to prevent orphaned background processes
cleanup_childhelper in bulk-upload-e2e.sh that sends a termination signal to a tracked child process (stored inCUR_PID) before teardown runs.cleanup_childbeforeteardown, ensuring background processes are killed on all exit paths.run_deadlinefunction now setsCUR_PIDafter backgrounding a command and clears it after the process exits or is force-killed at deadline.Macroscope summarized 23c9dd9.