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

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