-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kill processes via /proc
if ps
is not available
#36
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Semi-related to #29
We recently ran into
tree-kill
failures because AWS Lambda's Linux container (Amazon Linux 2) does not haveps
. I was able to work around this by detecting the Lambda environment and attempting to (mis)use the/proc
dir to kill processes: https://github.com/architect/sandbox/pull/594/files(Related: super open to feedback on whether you feel this approach was properly executed in the PR linked above. It's a bit mysterious how Node nested
spawn
s,exec
s, andfork
s influence/proc
, and whether enumerating and killing/proc/<pid>/task/<tid>
s is as effective as relying onps
– but this approach does correctly terminate child processes in Lambda and non-Lambda Linux.)Would you be amenable to a PR that makes a best effort to use
ps
on Linux, but then backs off to using/proc
if aspawn ps ENOENT
error is thrown?The text was updated successfully, but these errors were encountered: