You are viewing the version of this documentation from Perl 5.14.3. View the latest version
getppid

Returns the process id of the parent process.

Note for Linux users: on Linux, the C functions getpid() and getppid() return different values from different threads. In order to be portable, this behavior is not reflected by the Perl-level function getppid(), that returns a consistent value across threads. If you want to call the underlying getppid(), you may use the CPAN module Linux::Pid.