Perl getppid Function



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 produces the following result −

Parent Process ID 3830
perl_function_references.htm
Advertisements