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

Error thrown in exitHook is not handled causing zombie process #10

Open
sjones6 opened this issue Apr 5, 2019 · 0 comments
Open

Error thrown in exitHook is not handled causing zombie process #10

sjones6 opened this issue Apr 5, 2019 · 0 comments

Comments

@sjones6
Copy link

sjones6 commented Apr 5, 2019

The runHook method has no error handling:

if (err) {
  // Pass error, calling uncaught exception handlers
  return hook(err, stepTowardExit);
}
return hook(stepTowardExit);

If a hook throws, then the exit procedure stops and exit is never actually achieved. (I found this by hitting #9 which threw in an exit routine.)

This could be fixed by wrapping in a try/catch and calling stepTowardsExit on error.

@sjones6 sjones6 changed the title Error thrown in exitHook is not handled causing Zombie process Error thrown in exitHook is not handled causing zombie process Apr 5, 2019
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