Repository navigation
fix(cli): use portable ps columns for tree killing - #379
Merged
Merged
Conversation
Nightly images ship BusyBox ps, which does not support the GNU-only --ppid/--no-headers flags used by treeKill and its tests. The listing failed, so the process tree was empty and the tree-kill tests timed out. Use `ps -o pid,ppid` and filter by parent pid instead, which works with both GNU procps and BusyBox ps. Keep `pgrep -P` on macOS.
Exeloo
approved these changes
Nov 29, 2026
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.
Fixes the CLI nightly failure in
nightly.log.Nightly images ship BusyBox
ps, which rejects the GNU-only--ppidand--no-headersflags used bytreeKilland its tests. The listing failed,the test helper saw no children, and both tree-kill tests timed out. The
same bug meant process trees were not actually killed in that environment.
This switches both the implementation and the test helper to portable
ps -o pid,ppidoutput, parsingpid/ppidpairs and filtering by thetarget parent pid. macOS still uses
pgrep -P.Verified:
tree-kill.spec.tspasses locally and with a BusyBox-likepsshimrepo:build,repo:lint,repo:testall pass (pre-push hook)