public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-man@vger.kernel.org
Subject: [Bug 215769] man 2 vfork() does not document corner case when PID == 1
Date: Wed, 06 Apr 2022 17:13:09 +0000	[thread overview]
Message-ID: <bug-215769-11311-TdK8U3qCW2@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-215769-11311@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=215769

Florian Weimer (fweimer@redhat.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer@redhat.com

--- Comment #11 from Florian Weimer (fweimer@redhat.com) ---
(In reply to brauner from comment #10)
> glibc does vfork() via inline assembly massaging. There's probably
> atfork handlers and a bunch of other stuff involved so it's difficult to
> do a remote diagnosis.

glibc does not run fork handlers for vfork.

> (And note that calling anything other than execve() or _exit() after
> vfork() is basically undefined behavior.)

Historically, glibc supports calling malloc after vfork, so that applications
can implement their own form of close_range by reading /proc/self/fd.

I wonder if we need to handle CLONE_NEWTIME in posix_spawn in some way. Surely
that clone(CLONE_VM | CLONE_VFORK | SIGCHLD) call should fail as well if vfork
is blocked after CLONE_NEWTIME, so CLONE_NEWTIME probably breaks posix_spawn.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2022-04-06 19:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 11:02 [Bug 215769] New: man 2 vfork() does not document corner case when PID == 1 bugzilla-daemon
2022-03-30  0:48 ` [Bug 215769] " bugzilla-daemon
2022-03-30  1:00 ` bugzilla-daemon
2022-03-31  7:53 ` bugzilla-daemon
2022-03-31  8:12 ` bugzilla-daemon
2022-04-02 21:15 ` bugzilla-daemon
2022-04-04  8:05 ` bugzilla-daemon
2022-04-05 11:37 ` bugzilla-daemon
2022-04-05 19:27 ` bugzilla-daemon
2022-04-06  5:44 ` bugzilla-daemon
2022-04-06  8:46 ` bugzilla-daemon
2022-04-06 17:13 ` bugzilla-daemon [this message]
2022-04-06 19:22 ` bugzilla-daemon
2022-04-08 10:55 ` [Bug 215769] vfork() returns EINVAL after unshare(CLONE_NEWTIME) bugzilla-daemon
2022-04-08 11:36 ` bugzilla-daemon
2022-04-11 15:36 ` bugzilla-daemon
2022-05-09 10:23 ` bugzilla-daemon
2022-09-06  8:32 ` bugzilla-daemon
2022-10-08  0:25 ` bugzilla-daemon
2022-10-08 18:52 ` bugzilla-daemon

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=bug-215769-11311-TdK8U3qCW2@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-man@vger.kernel.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