Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <process.h>
    int getpid(void);

Description:
    The getpid function returns the process id for the current process.

Returns:
    The getpid function returns the process id for the current process.

Example:
    #include <stdio.h>
    #include <process.h>

    void main()
      {
        unsigned int process_id;
        auto char filename[13];

        process_id = getpid();
        /* use this to create a unique file name */
        sprintf( filename, "TMP%4.4x.TMP", process_id );
      }

Classification:
    POSIX 1003.1

Systems:
    All

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