fix(scanRear): guard kill against missing or stale scan_pid#84
Open
PhilippMundhenk wants to merge 2 commits into
Open
fix(scanRear): guard kill against missing or stale scan_pid#84PhilippMundhenk wants to merge 2 commits into
PhilippMundhenk wants to merge 2 commits into
Conversation
The unconditional `kill -9 "$(cat scan_pid)"; rm scan_pid` aborts with "No such file or directory" and "kill: '': not a pid or valid job spec" when the front-side conversion has already completed and cleaned up its tmp_dir (which contained scan_pid). Wrap the kill in existence and liveness checks so a duplex back-scan triggered after the front pipeline finished does not error out. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
7 tasks
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
scanRear.shunconditionally rankill -9 "$(cat scan_pid)"; rm scan_pidwhen a duplex back-scan was triggered.scan_pidfile inside it) was already removed, socatprinted nothing,killerrored withkill: '': not a pid or valid job spec, and the script aborted before scanning the back pages.[ -f scan_pid ]andkill -0) so a late-arriving rear scan is a no-op instead of an error.Test plan
tmp_dir, then trigger scan-to-email (which callsscanRear.sh). Previously this errored; now it should proceed quietly.🤖 Generated with Claude Code