From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f194.google.com ([209.85.166.194]:50846 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728403AbfAHRxK (ORCPT ); Tue, 8 Jan 2019 12:53:10 -0500 Received: by mail-it1-f194.google.com with SMTP id z7so7545224iti.0 for ; Tue, 08 Jan 2019 09:53:10 -0800 (PST) Date: Tue, 8 Jan 2019 10:53:06 -0700 From: Tycho Andersen To: Christian Brauner Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, luto@kernel.org, arnd@arndb.de, serge@hallyn.com, keescook@chromium.org, akpm@linux-foundation.org, jannh@google.com, oleg@redhat.com, cyphar@cyphar.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, dancol@google.com, timmurray@google.com, fweimer@redhat.com, tglx@linutronix.de, x86@kernel.org, ebiederm@xmission.com Subject: Re: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal() Message-ID: <20190108175306.GF29009@cisco> References: <20190102161654.9093-1-christian@brauner.io> <20190102161654.9093-2-christian@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190102161654.9093-2-christian@brauner.io> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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