fork

Alex Wilson alex.david.wilson at gmail.com
Mon Apr 18 03:12:50 EDT 2016


On Mon, Apr 18, 2016 at 12:48 AM, Nitin Varyani
<varyani.nitin1 at gmail.com> wrote:
>
>
> Linux kernel development by Robert Love describes the fork process as
>
> fork() -> clone() -> do_fork() -> copy_process()
>
> I am unable to find the clone() system call in linux 3.13.
> Can someone explain the proper flow of fork() system call initiated by the user?
>
> Where can I find the libc implementation for fork()? I want the code of all the functions involved in fork.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

I believe the fork and clone syscalls are found at /kernel/fork.c
under 3.13. (see link below)
They're wrapped in the nice SYSCALL_DEFINE# macros and all seem to
call do_fork().

http://lxr.free-electrons.com/source/kernel/fork.c?v=3.13#L1641

Can't really help you on the libc part, and you would need to specify
which libc implementation you're interested in.



More information about the Kernelnewbies mailing list