Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD]

From
Christian Brauner <christian@brauner.io>
Date
2019-04-29 20:51:54
Also in
lkml
Reply to
Florian Weimer, 2019-04-29
On Mon, Apr 29, 2019 at 10:38 PM Florian Weimer [off-list ref] wrote:
* Linus Torvalds:
quoted
On Mon, Apr 29, 2019 at 12:55 PM Jann Horn [off-list ref] wrote:
quoted
... I guess that already has a name, and it's called vfork(). (Well,
except that the Linux vfork() isn't a real vfork().)
What?

Linux vfork() is very much a real vfork(). What do you mean?
In Linux-as-the-ABI (as opposed to Linux-as-the-implementation), vfork
is sometimes implemented as fork, so applications cannot rely on the
vfork behavior regarding the stopped parent and the shared address
space.

In fact, it would be nice to have a flag we can check in the posix_spawn
implementation, so that we can support vfork-as-fork without any run
time cost to native Linux.
After the next merge window we'll be out of flags if things go as planned.
To address this problem, Jann and I are currently in the middle of working
on a clone version that we intend to send out for discussion afterwards.
If the proposal is acceptable it would bump the number of available flags
significantly, putting things like this within reach.

Christian
Thread (3 messages) 3 messages, 3 authors, last reply 2019-04-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help