From: Mel Gorman <mel@csn.ul.ie>
To: "Abu M. Muttalib" <abum@aftek.com>
Cc: linux-mm@kvack.org
Subject: Re: vfork implementation...
Date: Wed, 14 Jun 2006 11:18:47 +0100 (IST) [thread overview]
Message-ID: <Pine.LNX.4.64.0606141110330.2059@skynet.skynet.ie> (raw)
In-Reply-To: <BKEKJNIHLJDCFGDBOHGMGEEECPAA.abum@aftek.com>
On Wed, 14 Jun 2006, Abu M. Muttalib wrote:
> This mail is intended for Robert Love, I hope I can find him on the list.
>
> Please refer to Pg 24 of chapter 2 of Linux Kernel Development.
>
> As mentioned in the description of vfork call, it is said that child is not
> allowed to write to the address space,
>From the vfork() manpage;
The vfork() function has the same
effect as fork(), except that the behaviour is undefined if the process
created by vfork() either modifies any data other than a variable of
type pid_t used to store the return value from vfork(), or returns from
the function in which vfork() was called, or calls any other function
before successfully calling _exit() or one of the exec() family of
functions.
In other words, the child created by vfork() may be *able* to change the
address space, but it *should not* because the behaviour is undefined.
IIRC, there is no guarantee that the parent will even run again until the
child calls exit or exec so a child cannot depend on any behavior from the
parent or it could deadlock.
Historically, the point of vfork() is to create a process that
immediately called exec(). It does not create a copy of the parent address
space which was an important optimisation later replaced by Copy-On-Write.
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2006-06-14 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-14 9:41 Abu M. Muttalib
2006-06-14 9:46 ` Gleb Natapov
2006-06-14 10:03 ` Abu M. Muttalib
2006-06-14 10:06 ` Gleb Natapov
2006-06-14 10:17 ` Abu M. Muttalib
2006-06-14 10:16 ` Gleb Natapov
2006-06-14 10:18 ` Mel Gorman [this message]
Reply instructions:
You may reply publicly 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=Pine.LNX.4.64.0606141110330.2059@skynet.skynet.ie \
--to=mel@csn.ul.ie \
--cc=abum@aftek.com \
--cc=linux-mm@kvack.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox