GETPID(3) Library Functions Manual GETPID(3)

getpidget the process ID

#include <sys/types.h>
#include <unistd.h>

pid_t getpid(void);

The getpid() function returns the process ID of the calling process.

The getpid() function is always successful and no return value is reserved to indicate an error.

No errors are defined.

None.

None.

None.

exec(3) , fork(3) , getpgrp(3) , getppid(3) , kill(3) , setpgid(3) , setsid(3) , <sys/types.h> , <unistd.h> .

Derived from Issue 1 of the SVID.

February 1997 posix.fail