Skip to content

how to get the ppid of a process? #14957

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 requesting new Node.js features.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