Skip to content

Can't send signals using signal numbers #18553

Description

@hinzundcode

Using process.kill with signal numbers should work according to the documentation, but I get an ERR_UNKNOWN_SIGNAL error when using numbers instead of strings. For example:

$ node
> process.kill(process.pid, "SIGTERM")
Terminated

$ node
> 15 === require("constants").SIGTERM
true
> process.kill(process.pid, 15)
TypeError [ERR_UNKNOWN_SIGNAL]: Unknown signal: 15
    at process.kill (internal/process.js:168:15)

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.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