because the process which is executed from prompt has exited and the
children are still alive and printing.
On Thu, May 24, 2012 at 8:26 AM, Rajesh Kumar testalgori...@gmail.comwrote:
#includestdio.h
main()
{
fork();
fork();
fork();
printf(Hello Word\n);
}
output ---
its not about compilers ... its that new kernels kills all the child
processes, if parent gets killed before.. so that is the reason you
are gettin diff reasons
On 5/24/12, himanshu kansal himanshukansal...@gmail.com wrote:
i know that the program sholud have printed hello word 8 timesbt whn
main process have completed till the time all processes processes
prints Hello World,
to prevent it, use wait/wait4 family of fucntions.
~r
On Thu, May 24, 2012 at 8:26 AM, Rajesh Kumar testalgori...@gmail.com wrote:
#includestdio.h
main()
{
fork();
fork();
fork();
printf(Hello Word\n);
i know that the program sholud have printed hello word 8 timesbt whn
i run it, i get diffrnt reslts everytime and on diffrnt compilers...
please tell the reason
On Thu, May 24, 2012 at 11:11 AM, rajesh singarapu rajesh0...@gmail.comwrote:
main process have completed till the time