This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/child.c

18 lines
352 B
C
Raw Normal View History

#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
void main( int argc, char *argv[] )
{
int delay;
if( argc <= 1 ) exit( EXIT_FAILURE );
delay = atoi( argv[1] );
printf( "I am a child going to sleep "
"for %d seconds\n", delay );
sleep( delay );
printf( "I am a child awakening\n" );
exit( 123 );
}