From: David Newall <glibc@davidnewall.com>
To: Rich Felker <dalias@libc.org>
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
libc-alpha@sourceware.org
Subject: Re: [PATCH 2/3] posix: Use posix_spawn on popen
Date: Tue, 18 Sep 2018 01:31:00 -0000 [thread overview]
Message-ID: <87797b78-a951-f80b-553f-b9e6d208c073@davidnewall.com> (raw)
In-Reply-To: <20180917145025.GJ17995@brightrain.aerifal.cx>
On 18/09/18 00:20, Rich Felker wrote:
> The historical contract of vfork is that you can basically do nothing
> after it returns in the child except for exec or _exit
Yes, that is true. My understanding is that vfork was intended only as
a fast way of doing fork/exec sequence.
> One thing to note is that vfork is completely unsafe to use as
> documented if any signal handlers are installed, unless you block all
> signals before calling vfork, in which case the exec'd process will
> inherit a fully-blocked signal mask which is probably not what you
> want. Otherwise signal handlers may wrongly run in the child that's
> sharing memory with the parent.
You're saying that kernel will deliver a signal to child pid when it was
parent pid that was signalled. Can that really happen?
next prev parent reply other threads:[~2018-09-18 1:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 15:18 [PATCH 1/3] posix: Add internal symbols for posix_spawn interface Adhemerval Zanella
2018-09-15 15:16 ` [PATCH 2/3] posix: Use posix_spawn on popen Adhemerval Zanella
2018-09-16 5:13 ` David Newall
2018-09-17 14:50 ` Rich Felker
2018-09-17 17:32 ` Adhemerval Zanella
2018-09-18 1:31 ` David Newall [this message]
2018-09-18 3:12 ` Rich Felker
2018-09-18 18:01 ` Zack Weinberg
2018-09-19 5:18 ` Rich Felker
2018-09-19 15:53 ` Adhemerval Zanella
2018-10-17 17:20 ` Adhemerval Zanella
2018-10-19 22:08 ` Adhemerval Zanella
2018-09-15 15:18 ` [PATCH 3/3] posix: Use posix_spawn on system Adhemerval Zanella
2018-10-17 20:13 ` Adhemerval Zanella
2018-09-17 12:12 ` [PATCH 1/3] posix: Add internal symbols for posix_spawn interface Florian Weimer
2018-09-17 19:10 ` Adhemerval Zanella
2018-09-21 13:09 ` Florian Weimer
2018-10-17 17:11 ` Adhemerval Zanella
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=87797b78-a951-f80b-553f-b9e6d208c073@davidnewall.com \
--to=glibc@davidnewall.com \
--cc=adhemerval.zanella@linaro.org \
--cc=dalias@libc.org \
--cc=libc-alpha@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).