70 lines
873 B
HTML
70 lines
873 B
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>getpid(2)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>getpid(2)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
getpid, getppid - get process identification
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>#include</STRONG> <STRONG><sys/types.h></STRONG>
|
|
<STRONG>#include</STRONG> <STRONG><unistd.h></STRONG>
|
|
|
|
<STRONG>pid_t</STRONG> <STRONG>getpid(void)</STRONG>
|
|
<STRONG>pid_t</STRONG> <STRONG>getppid(void)</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>Getpid</STRONG> returns the process ID of the current process. Most often it is
|
|
used to generate uniquely-named temporary files.
|
|
|
|
<STRONG>Getppid</STRONG> returns the process ID of the parent of the current process.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man2/fork.2.html">fork(2)</A></STRONG>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|