getpid.2

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 2 代码 · 共 43 行

2
43
字号
.\" SCCSID: @(#)getpid.2	2.2	4/10/87.TH getpid 2.SH Namegetpid, getppid \- get process identification.SH Syntax.ft B.nf.B #include <sys/types.h>.B #include <unistd.h>.PP.B pid = getpid().B pid_t pid;.sp.B ppid = getppid().B pid_t ppid;.fi.SH Description.NXR "getpid system call".NXR "getppid system call".NXR "process ID" "getting"The.PN getpidsystem call returns the process ID of the current process.Most often it is used, with the host identifier .PN gethostid , to generate uniquely named temporary files..SH Return ValuesThe.PN getppidsystem call returns the process ID of the parentof the current process. .SH Environment.SS POSIXWhen your program is compiled in POSIX mode,the.PN getpidand.PN getppidfunctions return a value of type .I pid_t..SH See Alsogethostid(2)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?