Perl getppid Function

Advertisements


Description

This function returns the process ID of the parent process.

Syntax

Following is the simple syntax for this function:

getppid

Return Value

This function returns process ID of the parent process.

Example

Following is the example code showing its basic usage:

#!/usr/bin/perl

$ppid = getppid();

print "Parent Process ID $ppid\n";

When above code is executed, it produced following result

Parent Process ID 3830


Advertisements
Advertisements