Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: alex.david.wilson@gmail.com (Alex Wilson)
To: kernelnewbies@lists.kernelnewbies.org
Subject: fork
Date: Mon, 18 Apr 2016 01:12:50 -0600
Message-ID: <CAJ-r0KifySgnY_QQ0f+oZKFuTND6=8dwkfnJSQ+L=0d6YQ_ufA@mail.gmail.com> (raw)
In-Reply-To: <CAKfJ7K+ZFvYdFRefFn3=orALwOAmT2H6N6jdOf_z4E_+YVPSeQ@mail.gmail.com>

On Mon, Apr 18, 2016 at 12:48 AM, Nitin Varyani
<varyani.nitin1@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.

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18  6:48 fork varyani.nitin1
2016-04-18  7:12 ` alex.david.wilson [this message]
2016-04-18  8:18 ` fork cakturk
2020-01-09 10:35 Fork Christophe DUMONT
2020-01-09 10:47 ` Fork Valentin Vidić

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ-r0KifySgnY_QQ0f+oZKFuTND6=8dwkfnJSQ+L=0d6YQ_ufA@mail.gmail.com' \
    --to=alex.david.wilson@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git