Skip to content

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

Description

@sjones6

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions