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());
            }

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster