[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
getpid() Get Process ID
#include <process.h> Required for declarations only
int getpid(void);
getpid() returns the ID of the calling process. The ID is an integer
that uniquely identifies each process.
Returns: ID of calling process.
Notes: The process ID is used by mktemp() to create unique file
names.
-------------------------------- Example ---------------------------------
The following statement prints out the process ID of the current
process.
#include <process.h> /* for 'getpid' */
#include <stdio.h> /* for 'printf' */
main()
{
printf("the process ID = %d\n", getpid());
}
See Also:
mktemp()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson