Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
getpid(2)							     getpid(2)

Name
       getpid, getppid - get process identification

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

       pid = getpid()
       pid_t pid;

       ppid = getppid()
       pid_t ppid;

Description
       The  system  call  returns the process ID of the	current	process.  Most
       often it	is used, with the host identifier to generate  uniquely	 named
       temporary files.

Return Values
       The  system  call  returns  the process ID of the parent	of the current
       process.

Environment
   POSIX
       When your program is compiled in	POSIX mode, the	and functions return a
       value of	type pid_t.

See Also
       gethostid(2)

								     getpid(2)

Name | Syntax | Description | Return Values | Environment | See Also

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=getpid&sektion=2&manpath=ULTRIX+4.2>

home | help