Thanks Dave, it seems a very reasonable answer.<br><br>Regards,<br>Rohan.<br><br><div class="gmail_quote">On Thu, Sep 8, 2011 at 9:50 AM, Dave Hylands <span dir="ltr"><<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Rohan,<br>
<div class="im"><br>
On Wed, Sep 7, 2011 at 8:45 PM, rohan puri <<a href="mailto:rohan.puri15@gmail.com">rohan.puri15@gmail.com</a>> wrote:<br>
> Thanks Darshan. I went through that section of the book. I do agree that<br>
> fork(), vfork() in turn calls the clone() sys call which internally calls<br>
> do_fork() method.<br>
><br>
> The doubt which I have is there is a sys_fork() method which gets called<br>
> when fork() system call is invoked. But from userspace is there any way in<br>
> which we can make execute this code path, because if we make use of fork()<br>
> it will call clone() sys call and follow that code path. What I am trying to<br>
> figure out is that is that code (sys_fork() ) is redundant now or is<br>
> something still using it.<br>
<br>
</div>My guess is that the fork syscall is still there because it is part of<br>
the kernel API. Yes the clone call made fork redundant. But since fork<br>
was already part of the API, they left it in. This way programs which<br>
might use alternative runtime libraries, or which perhaps do system<br>
calls directly, will continue to work.<br>
<font color="#888888"><br>
--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
</font></blockquote></div><br>