/*------------------------------------------------------------------*/ /* hello.c */ /* Author: Bob Dondero */ /* The getpid system call. */ /*------------------------------------------------------------------*/ #include #include #include int main(void) { pid_t iPid; iPid = getpid(); printf("hello process (%d)\n", (int)iPid); return 0; } /* Sample executions: $ gcc -Wall -ansi -pedantic hello.c -o hello $ hello hello process (29961) $ hello hello process (29963) */