//------------------------------------------------------------------- // pidhello.cpp // // This example illustrates use of Linux's 'getpid()' function. // // to compile: $ g++ pidhello.cpp -o pidhello // to execute: $ ./pidhello // // programmer: ALLAN CRUSE // written on: 04 MAR 2009 //------------------------------------------------------------------- #include // for printf() #include // for fork() int main( int argc, char **argv ) { printf( "Hello from process %d \n", getpid() ); }