Perl getppid 函式



描述

此函式返回父程序的程序 ID。

語法

以下是此函式的簡單語法 -

getppid

返回值

此函式返回父程序的程序 ID。

示例

以下是顯示其基本用法示例程式碼 -

#!/usr/bin/perl

$ppid = getppid();

print "Parent Process ID $ppid\n";

執行上述程式碼後,會產生以下結果 -

Parent Process ID 3830
perl_function_references.htm
廣告
© . All rights reserved.