Thread (13 messages) 13 messages, 5 authors, 2019-05-18

Re: [PATCH v1 1/2] pid: add pidfd_open()

From: Aleksa Sarai <hidden>
Date: 2019-05-16 14:56:36
Also in: linux-alpha, linux-arch, linux-arm-kernel, linux-kselftest, linux-mips, linux-s390, linux-sh, linuxppc-dev, lkml, sparclinux

On 2019-05-16, Oleg Nesterov [off-list ref] wrote:
On 05/16, Christian Brauner wrote:
quoted
With the introduction of pidfds through CLONE_PIDFD it is possible to
created pidfds at process creation time.
Now I am wondering why do we need CLONE_PIDFD, you can just do

	pid = fork();
	pidfd_open(pid);
While the race window would be exceptionally short, there is the
possibility that the child will die and their pid will be recycled
before you do pidfd_open(). CLONE_PIDFD removes the race completely.

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help