Skip to content

how to get the ppid of a process? #14957

Closed
@chenminhua

Description

@chenminhua

I want to let child process know if it's parent was killed, so I hope the child process can get it's ppid.
If ppid == 1, then i can know the parent has died.

But process module seems not having this prop or method

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.libuvIssues and PRs related to the libuv dependency or the uv binding.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