请输入您要查询的百科知识:

 

词条 getppid
释义

getppid(取得父进程的进程识别码)

相关函数 fork,kill,getpid

表头文件 #include<unistd.h>

定义函数 pid_t getppid(void);

函数说明 getppid()用来取得目前进程的父进程识别码。

返回值 目前进程的父进程识别码。

范例

#include<unistd.h>

main()

{

printf(“My parent ‘pid =%d\”,getppid());

}

执行

My parent ‘pid =463

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/27 1:32:59