Thursday, 4 December 2014

Program to implement pause system call in UNIX


#include"myHeader.h"
main()
{
int a=10;
if(fork())
{
printf("%d ",a);
pause();
}
else
{
printf("%d ",a++);
printf("%d ",a);
}
}
OutPut:
madan@madan-Lenovo-G570:~/madan/osconcepts$ cc ex17.c
madan@madan-Lenovo-G570:~/madan/osconcepts$ ./a.out
10 11