linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: starlight-Utvwg/EOxnhfq8cQ1yknNg@public.gmane.org
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: suggestion for improvement to vfork() man page
Date: Tue, 07 Feb 2012 20:13:19 -0500	[thread overview]
Message-ID: <6.2.5.6.2.20120207195939.05b07c90@binnacle.cx> (raw)
In-Reply-To: <CAKgNAkjT05H1a9bk+d4XsEEsjUu0YEP10DDACCtBVsJ6OEsRYw @mail.gmail.com>

At 12:04 PM 2/8/2012 +1300, Michael Kerrisk wrote:
>Hi,
>
>On Wed, Feb 8, 2012 at 10:50 AM,  <starlight-Utvwg/EOxnhfq8cQ1yknNg@public.gmane.org> wrote:
>> +(However, on such systems,
>> +the preferred standard way of accomplishing the same result is to use
>> +.BR posix_spawn (3).)
>>
>> I'm not sure I agree on this.  Linux posix_spawn()
>> calls fork()
>
>I think isn't quite correct. I believe glibc's posix_spawn uses
>vfork() where it can. See sysdeps/posix/spawni.c::spawni().

Looked at glibc-2.9 and posix_spawn() uses
fork() in only when no process attibutes are
modified (i.e. it respects the AIX and Solaris
semantics of vfork though this is a bit irrelevent
since AIX and Solaris have kernel-native support
for posix_spawn) or when a non-standard
POSIX_SPAWN_USEVFORK flag is present.  It's
rather muddy so I stick with #ifdef vfork()
for Linux and #ifdef posix_spawn() for the
*nixes.

>
>So, I'll change that last sentence to
>
>[[
>(POSIX.1-2008 removed vfork() from the standard; the POSIX rationale
>for  the posix_spawn(3) function notes that that function, which
>provides functionality equivalent to fork(2)+exec(3) is designed 
>to be implementable on systems that lack an MMU.)
>]]
>
>What do you think?

That's fair.  Perhaps the posix_spawn() page should
have some text regarding the conditional use of vfork()
under the covers.  I seen no mention of vfork() on
the die.net page, and can't find it on kernel.org.

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-02-08  1:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 21:50 suggestion for improvement to vfork() man page starlight-Utvwg/EOxnhfq8cQ1yknNg
     [not found] ` <6.2.5.6.2.20120207164707.03c1f410-Utvwg/EOxnhfq8cQ1yknNg@public.gmane.org>
2012-02-07 23:04   ` Michael Kerrisk
2012-02-07 23:29   ` Eric Wong
     [not found]   ` <CAKgNAkjT05H1a9bk+d4XsEEsjUu0YEP10DDACCtBVsJ6OEsRYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-08  1:13     ` starlight-Utvwg/EOxnhfq8cQ1yknNg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-19  3:16 starlight-Utvwg/EOxnhfq8cQ1yknNg
     [not found] ` <6.2.5.6.2.20120118221253.03aad598-Utvwg/EOxnhfq8cQ1yknNg@public.gmane.org>
2012-01-19 18:36   ` Mike Frysinger
     [not found]     ` <201201191336.54114.vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2012-02-07 21:38       ` Michael Kerrisk
2012-01-19  3:04 starlight-Utvwg/EOxnhfq8cQ1yknNg
     [not found] ` <6.2.5.6.2.20120118214935.03aac8c8-8QzAbx0zao2B+jHODAdFcQ@public.gmane.org>
2012-02-07 21:06   ` Michael Kerrisk
     [not found]   ` <CAKgNAkgBfugTWMyaS4Nfvv802G=KB95_hx-cGuP6ckqAtSqyYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-07 21:34     ` starlight-Utvwg/EOxnhfq8cQ1yknNg

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=6.2.5.6.2.20120207195939.05b07c90@binnacle.cx \
    --to=starlight-utvwg/eoxnhfq8cq1yknng@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).