*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> getpid (2)              
Title
Content
Arch
Section
 

GETPID(2)

Contents


NAME    [Toc]    [Back]

     getpid, getppid -- get parent or calling process identification

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

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

     pid_t
     getpid(void);

     pid_t
     getppid(void);

DESCRIPTION    [Toc]    [Back]

     The getpid() system call returns the process ID of the calling process.
     Though the ID is guaranteed to be unique, it should NOT be used for constructing
 temporary file names, for security reasons; see mkstemp(3)
     instead.

     The getppid() system call returns the process ID of the parent of the
     calling process.

ERRORS    [Toc]    [Back]

     The getpid() and getppid() system calls are always successful, and no
     return value is reserved to indicate an error.

SEE ALSO    [Toc]    [Back]

      
      
     gethostid(3)

STANDARDS    [Toc]    [Back]

     The getpid() and getppid() system calls are expected to conform to
     ISO/IEC 9945-1:1990 (``POSIX.1'').

HISTORY    [Toc]    [Back]

     The getpid() function appeared in Version 7 AT&T UNIX.


FreeBSD 5.2.1			 June 4, 1993			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
pthread_atfork Tru64 Declares fork handler routines to be called when the calling thread's process forks a child process
pxfwait IRIX Obtains information about a calling process' child process
getppid Tru64 Get the process ID, process group ID, or parent process ID
getpgid HP-UX get process, process group and parent process ID.
getpgrp HP-UX get process, process group and parent process ID.
getpid HP-UX get process, process group and parent process ID.
getpgrp2 HP-UX get process, process group and parent process ID.
getppid HP-UX get process, process group and parent process ID.
getpid IRIX get process, process group, and parent process IDs
getpid Tru64 Get the process ID, process group ID, or parent process ID
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service