On 04/19, Christian Brauner wrote:
>
> +int main(int argc, char *argv[])
> +{
> + int ret = EXIT_FAILURE;
> + char buf[4096] = { 0 };
> + pid_t pid;
> + int pidfd, procfd, statusfd;
I think you need to initialize pidfd = 0 in this version ;) Otherwise,
Reviewed-by: Oleg Nesterov
This is a sample program showing userspace how to get race-free access
to process metadata from a pidfd. It is rather easy to do and userspace
can actually simply reuse code that currently parses a process's status
file in procfs.
The program can easily be extended into a generic helper suitable
On Fri, Apr 19, 2019 at 05:30:48PM +0200, Oleg Nesterov wrote:
> On 04/19, Christian Brauner wrote:
> >
> > +int main(int argc, char *argv[])
> > +{
> > + int ret = EXIT_FAILURE;
> > + char buf[4096] = { 0 };
> > + pid_t pid;
> > + int pidfd, procfd, statusfd;
>
> I think you need to
3 matches
Mail list logo