Please check the manual page getpid(2).