lkml.org 
[lkml]   [2019]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal()
On Wed, Jan 02, 2019 at 05:16:54PM +0100, Christian Brauner wrote:
> + /*
> + * Stop the child so we can inspect whether we have
> + * recycled pid PID_RECYCLE.
> + */
> + close(pipe_fds[0]);
> + ret = kill(recycled_pid, SIGSTOP);
> + close(pipe_fds[1]);
> + if (ret) {
> + (void)wait_for_pid(recycled_pid);
> + _exit(PIDFD_ERROR);
> + }

Sorry for being late to the party, but I wonder if this whole thing
couldn't be simplified with /proc/sys/kenrel/ns_last_pid?

Tycho

\
 
 \ /
  Last update: 2019-01-08 18:54    [W:0.096 / U:12.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site