#define _POSIX_SOURCE #include #include #include #include #include #define TRUE 1 #define FALSE 0 int loop; void handler( int signum ) { loop = FALSE; } void mypause( void ) { loop = TRUE; while( loop == TRUE ); printf( "\n" ); } int main( void ) { signal( SIGINT, handler ); printf( "press F4 to see message and syscall counts...\n" ); printf( "press DEL to continue...\n" ); mypause(); printf( "making system call getpid()...\n" ); getpid(); printf( "press F4 to see message and syscall counts...\n" ); printf( "press DEL to continue...\n" ); mypause(); printf( "making system call pause()...\n" ); printf( "press F4 to see message and syscall counts...\n" ); printf( "press DEL to exit...\n" ); pause(); printf( "\n" ); return 0; }