Skip to content

SIGQUIT handler being ignored when node is loaded as a shared library #10520

Closed
@sxa

Description

@sxa
  • Version: 4 and later
  • Platform: Most UNIX-based platforms, but reported on xLinux
  • Subsystem: core - signal handling

I've had a report from a user that is having an issue with #615 which set all signal handlers back to the default ones. The user is loading a shared library build of node, and it is overriding their own SIGQUIT signal handler (actually one set by the JVM their application uses but that's not inherently relevant) so the expected behaviour of their application is being altered when they load the node.js runtime dynamically.

While the reasons for removing any existing handlers (when node is being exec'd from another process) may have been sound, I suspect it is likely to be generally undesirable in the shared library case where we are being invoked by another application.

I'm open to thoughts on this so am raising this issue while mulling solutions:

  1. I could look at not resetting any existing handlers in the shared library case (the most obvious option!)
  2. We could just leave any SIGQUIT handler in place to resolve this particular scenario
  3. We could look at skipping more of the startup section when loaded as a shared library
  4. Have a runtime parameter to control the overrides
  5. Something else?

FYI @bnoordhuis @sam-github since you wrote/reviewed the original PR, and @stefanmb for info ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.processIssues and PRs related to the process subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions