getpid - get process id
Standard C Library (libc, -lc)
#include <unistd.h> pid_t getpid(void);
getpid returns the process id of the current process.
getpid does not fail.