Skip to content

fix(cli): use portable ps columns for tree killing - #379

Merged
MartinFillon merged 1 commit into
mainfrom
fix/busybox-tree-kill
Nov 29, 2026
Merged

MartinFillon merged 1 commit into
mainfrom
fix/busybox-tree-kill

Conversation

@MartinFillon

Copy link
Copy Markdown
Contributor

Fixes the CLI nightly failure in nightly.log.

Nightly images ship BusyBox ps, which rejects the GNU-only --ppid and
--no-headers flags used by treeKill and 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,ppid output, parsing pid/ppid pairs and filtering by the
target parent pid. macOS still uses pgrep -P.

Verified:

  • tree-kill.spec.ts passes locally and with a BusyBox-like ps shim
  • full unit suite: 406 passed
  • e2e suite: 101 passed, 1 skipped, 1 todo
  • repo:build, repo:lint, repo:test all pass (pre-push hook)

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.
@MartinFillon
MartinFillon requested a review from Exeloo as a code owner November 29, 2026 09:59
@MartinFillon
MartinFillon merged commit 74e2a84 into main Nov 29, 2026
9 checks passed
@MartinFillon
MartinFillon deleted the fix/busybox-tree-kill branch November 29, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants