Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>getpid() get process id</b> http://www.X-Hacker.org [<<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 an integer that identifies the calling process.

    Returns:    Unique ID of calling process.

      Notes:    The process ID is used by mktemp() to create unique file
                names.

 Portability:   Not supported by ANSI standard.

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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson