mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: Valdis.Kletnieks@vt.edu
Cc: "Halesh S" <halesh.s@india.com>, linux-kernel@vger.kernel.org
Subject: Re: parent process behaviour to signal after vfork()
Date: Thu, 30 Oct 2008 08:26:50 -0500	[thread overview]
Message-ID: <cfd18e0f0810300626k21a10b22y9f8ead75c02f7782@mail.gmail.com> (raw)
In-Reply-To: <cfd18e0f0810300624g7948b2efqe979278413d746b8@mail.gmail.com>

Oops -- forgot the patch.  Here it is:

--- a/man2/vfork.2
+++ b/man2/vfork.2
@@ -80,13 +80,15 @@ where a child will be created which then
immediately issues an
 .BR vfork ()
 differs from
 .BR fork (2)
-in that the parent is suspended until the child makes a call to
-.BR execve (2)
-or
-.BR _exit (2).
-The child shares all memory with its parent, including the stack, until
-.BR execve (2)
-is issued by the child.
+in that the parent is suspended until the child terminates
+(either normally,
+by calling
+.BR exit (2),
+or abnormally, after delivery of a fatal signal),
+or it makes a call to
+.BR execve (2).
+Until that point, the child shares all memory with its parent,
+including the stack.
 The child must not return from the current function or call
 .BR exit (3),
 but may call
@@ -95,9 +97,8 @@ but may call
 Signal handlers are inherited, but not shared.
 Signals to the parent
 arrive after the child releases the parent's memory
-(i.e., after the child calls
-.BR _exit (2)
-or
+(i.e., after the child terminates
+or calls
 .BR execve (2)).
 .SS "Historic Description"
 Under Linux,
@@ -135,11 +136,9 @@ The requirements put on
 by the standards are weaker than those put on
 .BR fork (2),
 so an implementation where the two are synonymous is compliant.
-In particular, the programmer cannot
-rely on the parent remaining blocked until a call of
-.BR execve (2)
-or
-.BR _exit (2)
+In particular, the programmer cannot rely on the parent
+remaining blocked until the child either terminates or calls
+.BR execve (2),
 and cannot rely on any specific behavior with respect to shared memory.
 .\" In AIXv3.1 vfork is equivalent to fork.
 .SH NOTES

      reply	other threads:[~2008-10-30 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28  6:43 Halesh S
2008-10-28  8:24 ` Halesh S
2008-10-29 13:17 ` Michael Kerrisk
2008-10-30  5:38   ` Valdis.Kletnieks
2008-10-30 13:24     ` Michael Kerrisk
2008-10-30 13:26       ` Michael Kerrisk [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=cfd18e0f0810300626k21a10b22y9f8ead75c02f7782@mail.gmail.com \
    --to=mtk.manpages@googlemail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=halesh.s@india.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /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

all inboxes | Powered by JetHome®