Doubt fork system call

rohan puri rohan.puri15 at gmail.com
Thu Sep 8 01:10:09 EDT 2011


Thanks Dave, it seems a very reasonable answer.

Regards,
Rohan.

On Thu, Sep 8, 2011 at 9:50 AM, Dave Hylands <dhylands at gmail.com> wrote:

> Hi Rohan,
>
> On Wed, Sep 7, 2011 at 8:45 PM, rohan puri <rohan.puri15 at gmail.com> wrote:
> > Thanks Darshan. I went through that section of the book. I do agree that
> > fork(), vfork() in turn calls the clone() sys call which internally calls
> > do_fork() method.
> >
> > The doubt which I have is there is a sys_fork() method which gets called
> > when fork() system call is invoked. But from userspace is there any way
> in
> > which we can make execute this code path, because if we make use of
> fork()
> > it will call clone() sys call and follow that code path. What I am trying
> to
> > figure out is that is that code (sys_fork() ) is redundant now or is
> > something still using it.
>
> My guess is that the fork syscall is still there because it is part of
> the kernel API. Yes the clone call made fork redundant. But since fork
> was already part of the API, they left it in. This way programs which
> might use alternative runtime libraries, or which perhaps do system
> calls directly, will continue to work.
>
> --
> Dave Hylands
> Shuswap, BC, Canada
> http://www.davehylands.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110908/8813c8e0/attachment-0001.html 


More information about the Kernelnewbies mailing list