MirBSD manpage: 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.1").

MirBSD #10-current               June 4, 1993                                1

Generated on 2020-05-24 22:24:40 by $MirOS: src/scripts/roff2htm,v 1.101 2020/05/03 18:46:23 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2020 MirBSD.

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