MirOS Manual: getpid(2), getppid(2)

GETPID(2)                  BSD Programmer's Manual                   GETPID(2)

NAME

     getpid, getppid - get parent or calling process identification

SYNOPSIS

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

     pid_t
     getpid(void);

     pid_t
     getppid(void);

DESCRIPTION

     getpid() 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; see mkstemp(3) instead.

     getppid() returns the process ID of the parent of the calling process.

ERRORS

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

SEE ALSO

     gethostid(3)

STANDARDS

     getpid() and getppid() conform to IEEE Std 1003.1-1988 ("POSIX").

MirOS BSD #10-current            June 4, 1993                                1

Generated on 2014-07-04 21:17:45 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.