Re: For review: pidfd_send_signal(2) manual page

2019-09-25 Thread Michael Kerrisk (man-pages)
Hello Christian, On 9/25/19 3:53 PM, Christian Brauner wrote: > On Wed, Sep 25, 2019 at 03:46:26PM +0200, Michael Kerrisk (man-pages) wrote: >> On 9/24/19 11:53 PM, Christian Brauner wrote: >>> On Tue, Sep 24, 2019 at 11:00:03PM +0200, Michael Kerrisk (man-pages) wrote: Hello Christian,

Re: For review: pidfd_send_signal(2) manual page

2019-09-25 Thread Michael Kerrisk (man-pages)
On 9/25/19 3:51 PM, Florian Weimer wrote: > * Michael Kerrisk: > >>If these conditions don't hold true, then the child process should >>instead be created using clone(2) with the CLONE_PID flag. > > I think this should be CLONE_PIDFD. Thanks Florian. Fixed. Cheers, Michael --

Re: For review: pidfd_send_signal(2) manual page

2019-09-25 Thread Christian Brauner
On Wed, Sep 25, 2019 at 03:46:26PM +0200, Michael Kerrisk (man-pages) wrote: > On 9/24/19 11:53 PM, Christian Brauner wrote: > > On Tue, Sep 24, 2019 at 11:00:03PM +0200, Michael Kerrisk (man-pages) wrote: > >> Hello Christian, > >> > > If you're the parent of the process you can do this withou

Re: For review: pidfd_send_signal(2) manual page

2019-09-25 Thread Florian Weimer
* Michael Kerrisk: >If these conditions don't hold true, then the child process should >instead be created using clone(2) with the CLONE_PID flag. I think this should be CLONE_PIDFD.

Re: For review: pidfd_send_signal(2) manual page

2019-09-25 Thread Michael Kerrisk (man-pages)
On 9/24/19 11:53 PM, Christian Brauner wrote: > On Tue, Sep 24, 2019 at 11:00:03PM +0200, Michael Kerrisk (man-pages) wrote: >> Hello Christian, >> > If you're the parent of the process you can do this without CLONE_PIDFD: > pid = fork(); > pidfd = pidfd_open(); > ret = pidfd_send_s

Re: For review: pidfd_send_signal(2) manual page

2019-09-25 Thread Michael Kerrisk (man-pages)
Hello Daniel, On 9/24/19 11:08 PM, Daniel Colascione wrote: > On Tue, Sep 24, 2019 at 2:00 PM Michael Kerrisk (man-pages) > wrote: >> >> Hello Christian, >> > If you're the parent of the process you can do this without CLONE_PIDFD: > pid = fork(); > pidfd = pidfd_open(); > ret = p

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Jann Horn
On Mon, Sep 23, 2019 at 1:26 PM Florian Weimer wrote: > * Michael Kerrisk: > >The pidfd_send_signal() system call allows the avoidance of race > >conditions that occur when using traditional interfaces (such as > >kill(2)) to signal a process. The problem is that the t

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Christian Brauner
On Tue, Sep 24, 2019 at 11:00:03PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Christian, > > >>> If you're the parent of the process you can do this without CLONE_PIDFD: > >>> pid = fork(); > >>> pidfd = pidfd_open(); > >>> ret = pidfd_send_signal(pidfd, 0, NULL, 0); > >>> if (ret < 0 && er

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Daniel Colascione
On Tue, Sep 24, 2019 at 2:00 PM Michael Kerrisk (man-pages) wrote: > > Hello Christian, > > >>> If you're the parent of the process you can do this without CLONE_PIDFD: > >>> pid = fork(); > >>> pidfd = pidfd_open(); > >>> ret = pidfd_send_signal(pidfd, 0, NULL, 0); > >>> if (ret < 0 && errno == E

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Michael Kerrisk (man-pages)
Hello Christian, >>> If you're the parent of the process you can do this without CLONE_PIDFD: >>> pid = fork(); >>> pidfd = pidfd_open(); >>> ret = pidfd_send_signal(pidfd, 0, NULL, 0); >>> if (ret < 0 && errno == ESRCH) >>> /* pidfd refers to another, recycled process */ >> >> Although there

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Christian Brauner
On Tue, Sep 24, 2019 at 09:57:04PM +0200, Christian Brauner wrote: > On Tue, Sep 24, 2019 at 09:44:49PM +0200, Michael Kerrisk (man-pages) wrote: > > Hello Christian, > > > > On 9/23/19 4:23 PM, Christian Brauner wrote: > > > On Mon, Sep 23, 2019 at 01:26:34PM +0200, Florian Weimer wrote: > > >> *

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Christian Brauner
On Tue, Sep 24, 2019 at 09:44:49PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Christian, > > On 9/23/19 4:23 PM, Christian Brauner wrote: > > On Mon, Sep 23, 2019 at 01:26:34PM +0200, Florian Weimer wrote: > >> * Michael Kerrisk: > >> > >>> SYNOPSIS > >>>int pidfd_send_signal(int pi

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Michael Kerrisk (man-pages)
Hello Christian, On 9/23/19 4:23 PM, Christian Brauner wrote: > On Mon, Sep 23, 2019 at 01:26:34PM +0200, Florian Weimer wrote: >> * Michael Kerrisk: >> >>> SYNOPSIS >>>int pidfd_send_signal(int pidfd, int sig, siginfo_t info, >>> unsigned int flags); >> >> Thi

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Michael Kerrisk (man-pages)
Hello Florian, On 9/23/19 1:26 PM, Florian Weimer wrote: > * Michael Kerrisk: > >> SYNOPSIS >>int pidfd_send_signal(int pidfd, int sig, siginfo_t info, >> unsigned int flags); > > This probably should reference a header for siginfo_t. Thanks. I added: #inclu

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Michael Kerrisk (man-pages)
On 9/23/19 1:31 PM, Daniel Colascione wrote: > On Mon, Sep 23, 2019 at 2:12 AM Michael Kerrisk (man-pages) > wrote: >>The pidfd_send_signal() system call allows the avoidance of race >>conditions that occur when using traditional interfaces (such as >>kill(2)) to signal

Re: For review: pidfd_send_signal(2) manual page

2019-09-24 Thread Michael Kerrisk (man-pages)
On 9/23/19 11:27 PM, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > >> Hello Christian and all, >> >> Below, I have the rendered version of the current draft of >> the pidfd_send_signal(2) manual page that I have written. >> The page source can be found in a Git branch at: >>

Re: For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Eric W. Biederman
"Michael Kerrisk (man-pages)" writes: > Hello Christian and all, > > Below, I have the rendered version of the current draft of > the pidfd_send_signal(2) manual page that I have written. > The page source can be found in a Git branch at: > https://git.kernel.org/pub/scm/docs/man-pages/man-pages.

Re: For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Michael Kerrisk (man-pages)
Hello Christian, On 9/23/19 4:29 PM, Christian Brauner wrote: > On Mon, Sep 23, 2019 at 11:12:00AM +0200, Michael Kerrisk (man-pages) wrote: >> Hello Christian and all, >> >> Below, I have the rendered version of the current draft of >> the pidfd_send_signal(2) manual page that I have written. >>

Re: For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Christian Brauner
On Mon, Sep 23, 2019 at 11:12:00AM +0200, Michael Kerrisk (man-pages) wrote: > Hello Christian and all, > > Below, I have the rendered version of the current draft of > the pidfd_send_signal(2) manual page that I have written. > The page source can be found in a Git branch at: > https://git.kernel

Re: For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Christian Brauner
On Mon, Sep 23, 2019 at 01:26:34PM +0200, Florian Weimer wrote: > * Michael Kerrisk: > > > SYNOPSIS > >int pidfd_send_signal(int pidfd, int sig, siginfo_t info, > > unsigned int flags); > > This probably should reference a header for siginfo_t. Agreed. > >

Re: For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Daniel Colascione
On Mon, Sep 23, 2019 at 2:12 AM Michael Kerrisk (man-pages) wrote: >The pidfd_send_signal() system call allows the avoidance of race >conditions that occur when using traditional interfaces (such as >kill(2)) to signal a process. The problem is that the traditional >

Re: For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Florian Weimer
* Michael Kerrisk: > SYNOPSIS >int pidfd_send_signal(int pidfd, int sig, siginfo_t info, > unsigned int flags); This probably should reference a header for siginfo_t. >ESRCH The target process does not exist. If the descriptor is valid, does this me

For review: pidfd_send_signal(2) manual page

2019-09-23 Thread Michael Kerrisk (man-pages)
Hello Christian and all, Below, I have the rendered version of the current draft of the pidfd_send_signal(2) manual page that I have written. The page source can be found in a Git branch at: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/log/?h=draft_pidfd I would be pleased to recei