Commit 3de8c66
committed
fix: handle ps.tree() failure gracefully in kill() on Alpine Linux
On Alpine Linux (and other environments using BusyBox), the ps output
format differs from standard GNU/procps ps. The @webpod/ingrid parser
used by @webpod/ps cannot parse BusyBox output and throws a TypeError
when kill() attempts to collect child processes via ps.tree().
Wrap the ps.tree() loop in a try/catch so that parse failures fall
through to the direct process.kill() call below. The parent process
is still killed; child processes may survive in degraded environments,
but the caller no longer receives an unexpected TypeError.
Fixes #13691 parent 98531fc commit 3de8c66
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1086 | 1092 | | |
1087 | 1093 | | |
1088 | 1094 | | |
| |||
0 commit comments