Skip to content
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

No error given when kill fails #23

Open
mlucool opened this issue Jul 12, 2018 · 0 comments
Open

No error given when kill fails #23

mlucool opened this issue Jul 12, 2018 · 0 comments

Comments

@mlucool
Copy link

mlucool commented Jul 12, 2018

Given the following program:

process.on('SIGTERM', () => console.error('Ignoring'));

let n = 0;
setInterval(()=> console.log(n++), 2*1000);

I have tried to kill it using treeKill via something like

treeKill(myPID, (err) => {console.log(typeof err)})

Here I get no err because, like kill on linux, the exit code is 0 as the signal was sent successfully. Is this expected? I assume so, but it makes ensuring a process is dead a little more complex.

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

No branches or pull requests

1 participant