From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>,
zatrazz <zatrazz@gmail.com>
Cc: bugzilla-daemon@bugzilla.kernel.org,
Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [Bug 214871] New: Man(3) system outdated
Date: Tue, 2 Nov 2021 08:37:41 -0300 [thread overview]
Message-ID: <dace5701-600b-b6cb-9c43-63cb26f7501c@linaro.org> (raw)
In-Reply-To: <42f0a401-d223-3b5a-f076-bd033f716aae@gmail.com>
On 02/11/2021 06:58, Alejandro Colomar (man-pages) via Libc-alpha wrote:
> Hi Adhemerval, Michael,
>
> On 11/1/21 13:06, zatrazz wrote:
>> Hi Alejandro,
>>
>> Indeed we changed glibc to use posix_spawn on system and popen on 2.29 since
>> to use posix_spawn (which uses clone (CLONE_VFORK | CLONE_VM)). It plays
>> way better with Linux memory subsystem than fork() + exec() specially when such
>> calls are used with process with large RSS.
>
> I applied the following patch. I'll close the bug.
>
> Thanks,
>
> Alex
I forgot to add that neither system(), posix_spawn(), nor popen() call
atfork handlers [1]. POSIX recently changed their description to make
it implementation-defined instead of unspecified [2], so I think it
is worth to change that is not really behave as called by fork() (since
it will run atfork handlers).
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=17490
[2] https://www.austingroupbugs.net/view.php?id=1317
>
> ---
> system.3: It doesn't call fork anymore
>
> Reported-by: Michael Kearney <mikekearney85@hotmail.com>
> Cc: Adhemerval Zanella <zatrazz@gmail.com>
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
>
> diff --git a/man3/system.3 b/man3/system.3
> index 880fe93c6..bde45ed82 100644
> --- a/man3/system.3
> +++ b/man3/system.3
> @@ -40,9 +40,9 @@ system \- execute a shell command
> .SH DESCRIPTION
> The
> .BR system ()
> -library function uses
> +library function behaves as if it used
> .BR fork (2)
> -to create a child process that executes the shell command specified in
> +to create a child process that executed the shell command specified in
> .I command
> using
> .BR execl (3)
>
>
>
prev parent reply other threads:[~2021-11-02 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-214871-216477@https.bugzilla.kernel.org/>
2021-10-30 11:55 ` Alejandro Colomar (man-pages)
2021-11-01 12:06 ` zatrazz
2021-11-02 9:58 ` Alejandro Colomar (man-pages)
2021-11-02 11:37 ` Adhemerval Zanella [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=dace5701-600b-b6cb-9c43-63cb26f7501c@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=alx.manpages@gmail.com \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=libc-alpha@sourceware.org \
--cc=zatrazz@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).