So many times, we make foreground process to background process in linux system. How does it handle internally ?
while(true) { sleep(1); /* sleep for 1 second */ if(getpid()%2 == 0) { fork(); } }
How many no.of processes are created by the end of 12th second, if time starts from 0th second? Process id's start from 0.
Can someone please explain using any example ?