All of lore.kernel.org
 help / color / mirror / Atom feed
From: cyphar@cyphar.com (Aleksa Sarai)
Subject: [PATCH v1 1/2] pid: add pidfd_open()
Date: Fri, 17 May 2019 01:12:02 +1000	[thread overview]
Message-ID: <20190516151202.hrawrx7hxllmz2di@yavin> (raw)
Message-ID: <20190516151202.ZN_r9Je0Ot_xwRdzchAp-bskeCEvBsN2jbtrus_E_5g@z> (raw)
In-Reply-To: <20190516150611.GC22564@redhat.com>

On 2019-05-16, Oleg Nesterov <oleg@redhat.com> wrote:
> On 05/17, Aleksa Sarai wrote:
> > On 2019-05-16, Oleg Nesterov <oleg@redhat.com> wrote:
> > > On 05/16, Christian Brauner wrote:
> > > > 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
> 
> Yes,
> 
> > and their pid will be recycled
> > before you do pidfd_open().
> 
> No.
> 
> Unless the caller's sub-thread does wait() before pidfd_open(), of course.
> Or unless you do signal(SIGCHILD, SIG_IGN).

What about CLONE_PARENT?

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linaro.org/pipermail/linux-kselftest-mirror/attachments/20190517/4c27b532/attachment-0001.sig>

  reply	other threads:[~2019-05-16 15:12 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 13:59 [PATCH v1 1/2] pid: add pidfd_open() Christian Brauner
2019-05-16 13:59 ` Christian Brauner
2019-05-16 13:59 ` Christian Brauner
2019-05-16 13:59 ` Christian Brauner
2019-05-16 13:59 ` christian
2019-05-16 13:59 ` Christian Brauner
2019-05-16 13:59 ` [PATCH v1 2/2] tests: add pidfd_open() tests Christian Brauner
2019-05-16 13:59   ` Christian Brauner
2019-05-16 13:59   ` Christian Brauner
2019-05-16 13:59   ` Christian Brauner
2019-05-16 13:59   ` christian
2019-05-16 13:59   ` Christian Brauner
2019-05-16 14:27 ` [PATCH v1 1/2] pid: add pidfd_open() Oleg Nesterov
2019-05-16 14:27   ` Oleg Nesterov
2019-05-16 14:27   ` Oleg Nesterov
2019-05-16 14:27   ` Oleg Nesterov
2019-05-16 14:27   ` oleg
2019-05-16 14:27   ` Oleg Nesterov
2019-05-16 14:27   ` Oleg Nesterov
2019-05-16 14:56   ` Aleksa Sarai
2019-05-16 14:56     ` Aleksa Sarai
2019-05-16 14:56     ` Aleksa Sarai
2019-05-16 14:56     ` Aleksa Sarai
2019-05-16 14:56     ` Aleksa Sarai
2019-05-16 14:56     ` cyphar
2019-05-16 14:56     ` Aleksa Sarai
2019-05-16 14:56     ` Aleksa Sarai
2019-05-16 15:06     ` Oleg Nesterov
2019-05-16 15:06       ` Oleg Nesterov
2019-05-16 15:06       ` Oleg Nesterov
2019-05-16 15:06       ` Oleg Nesterov
2019-05-16 15:06       ` Oleg Nesterov
2019-05-16 15:06       ` oleg
2019-05-16 15:06       ` Oleg Nesterov
2019-05-16 15:06       ` Oleg Nesterov
2019-05-16 15:12       ` Aleksa Sarai [this message]
2019-05-16 15:12         ` Aleksa Sarai
2019-05-16 15:12         ` Aleksa Sarai
2019-05-16 15:12         ` Aleksa Sarai
2019-05-16 15:12         ` Aleksa Sarai
2019-05-16 15:12         ` cyphar
2019-05-16 15:12         ` Aleksa Sarai
2019-05-16 15:12         ` Aleksa Sarai
2019-05-16 15:22         ` Oleg Nesterov
2019-05-16 15:22           ` Oleg Nesterov
2019-05-16 15:22           ` Oleg Nesterov
2019-05-16 15:22           ` Oleg Nesterov
2019-05-16 15:22           ` Oleg Nesterov
2019-05-16 15:22           ` oleg
2019-05-16 15:22           ` Oleg Nesterov
2019-05-16 15:22           ` Oleg Nesterov
2019-05-16 15:29           ` Christian Brauner
2019-05-16 15:29             ` Christian Brauner
2019-05-16 15:29             ` Christian Brauner
2019-05-16 15:29             ` Christian Brauner
2019-05-16 15:29             ` christian
2019-05-16 15:29             ` Christian Brauner
2019-05-16 15:29             ` Christian Brauner
2019-05-16 14:57   ` Christian Brauner
2019-05-16 14:57     ` Christian Brauner
2019-05-16 14:57     ` Christian Brauner
2019-05-16 14:57     ` Christian Brauner
2019-05-16 14:57     ` christian
2019-05-16 14:57     ` Christian Brauner
2019-05-16 14:57     ` Christian Brauner
2019-05-16 14:56 ` Geert Uytterhoeven
2019-05-16 14:56   ` Geert Uytterhoeven
2019-05-16 14:56   ` Geert Uytterhoeven
2019-05-16 14:56   ` Geert Uytterhoeven
2019-05-16 14:56   ` Geert Uytterhoeven
2019-05-16 14:56   ` geert
2019-05-16 14:56   ` Geert Uytterhoeven
2019-05-16 14:56   ` Geert Uytterhoeven
2019-05-16 14:58   ` Christian Brauner
2019-05-16 14:58     ` Christian Brauner
2019-05-16 14:58     ` Christian Brauner
2019-05-16 14:58     ` Christian Brauner
2019-05-16 14:58     ` Christian Brauner
2019-05-16 14:58     ` christian
2019-05-16 14:58     ` Christian Brauner
2019-05-16 14:58     ` Christian Brauner
2019-05-18  9:48 ` Joel Fernandes
2019-05-18  9:48   ` Joel Fernandes
2019-05-18  9:48   ` Joel Fernandes
2019-05-18  9:48   ` Joel Fernandes
2019-05-18  9:48   ` joel
2019-05-18  9:48   ` Joel Fernandes
2019-05-18  9:48   ` Joel Fernandes
2019-05-18 10:04   ` Christian Brauner
2019-05-18 10:04     ` Christian Brauner
2019-05-18 10:04     ` Christian Brauner
2019-05-18 10:04     ` Christian Brauner
2019-05-18 10:04     ` christian
2019-05-18 10:04     ` Christian Brauner
2019-05-18 10:04     ` Christian Brauner

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=20190516151202.hrawrx7hxllmz2di@yavin \
    --to=cyphar@cyphar.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.