no error thrown with exit(0) in the child process of vfork()
nirojpokhrel at gmail.com
Fri Jan 18 09:29:38 EST 2013
I have been trying to create a process using vfork(). And both of the child
and the parent process execute it in the same address space. So, if I
execute exit(0) in the child process, it should throw some error right.
Since the execution is happening in child process first and if I release
all the resources by using exit(0) in the child process then parent should
be deprived of the resources and should throw some errors right ??
In the following code, however the process ran fine even though I have
exit(0) in the child process ........
printf("\nI am a child process.\n");
printf(" %d ",i++);
printf("\nI am a parent process.\n");
printf(" %d ",i);
// The program is running fine .....
But as I have read it should throw some error right ?? I don't know what I
am missing . Please point out the point I'm missing. Thanking you in
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies