Test your computer capability to findout how many processes it can hold or accomodate
#include<stdio.h>
#include<unistd.h>
#define MAX 1000
int main()
{
int i=0;
int ret;
for(i=0;i<MAX;i++)
{
ret = fork();
if(ret == 0)
{
printf("count = %d, PID=%d, PPID=%d\n", i,getpid(),getppid());
}
i++;
}
sleep(3);
return 0;
}
Sign up here with your email
ConversionConversion EmoticonEmoticon