Skip to content

Listening to SIGUSR1 blocks debugger #19619

Description

@mlucool
  • Version: v8.9.4
  • Platform: 3.10.0-693.17.1.el7.x86_64

I am not sure which is the correct behavior for an intercepted SIGUSR1, the documentation or the a test case. Can the code and/or documentation please be fixed?

process documentation says:

SIGUSR1 is reserved by Node.js to start the debugger. It's possible to install a listener but doing so will not stop the debugger from starting.

But a quick test shows that the debugger is not started.

Code:

let i = 0;
setInterval(() =>
        console.log(i++),
    1000);

process.on('SIGUSR1', () => console.log('Got SIGUSR1'))

If you send a SIGUSR1 only Got SIGUSR1 is printed. The typical Debugger listening on ws://127.0.0.1:9229/66fb119d-2443-4bdf-80b1-6386995ba253 is not printed. You can also verify that the debugger didn't start with with netstat -ap.

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

    docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.inspectorIssues and PRs related to the V8 inspector protocol.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions