From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4F4111F45A for ; Wed, 14 Aug 2019 17:06:45 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=vqs+ s7LDFxhnW05xuqonfkWRYeZLeoP62xxeRrT/BjUD0D95D7RuDQjyzSZBruPN4fp+ L1vHtpqt6VIExQM6/9a3nAXFLPhorkRhXucOKdP5u0j6go0eplfX7BdWWXSJyurZ nSLUGOvHlkOmDQ1TXEfBqKEkjcv8MFf4G1uZ910= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=X6y/+2t0yW 7yErO6o/LFsY1ixMA=; b=qMnnz8BmXHwNTinja/0XtqS0HQdpRu787B5FIPpr0r /hEQl0MHkwSWNcA+5rUIIX0hJZxFZmeQlUq7+bdPUJQ2hAEZAtPRTEk52zxoJS0P 37OCSljZOkzrqpzmE04WA8R2R/emfoSY3Loj61atvKIa+nJlJZC5te1ur9xqYUCv U= Received: (qmail 28803 invoked by alias); 14 Aug 2019 17:06:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 28795 invoked by uid 89); 14 Aug 2019 17:06:42 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-lj1-f195.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qmLXQ1DX4enCLG/blcVpIzNK/UzBgUaIlDbRYanVvW4=; b=Csf25HiuxApDjXUxMS0pWtKyfLzVjYG4VXzOleml//uHgzP+qL0YwcJqGaQuNRQpl+ 2SYQ8+b2PWgohIGByl+o5JyIcIk29Yc8tix8B3PRd7owe8Qz46sqgTFXQlaKOw2YUepA ZDOaJE5DMkDYDpikit2AFTUhw9j/S3D2wNmEE= MIME-Version: 1.0 References: <20190814154400.6371-1-christian.brauner@ubuntu.com> <20190814154400.6371-2-christian.brauner@ubuntu.com> <20190814160917.GG11595@redhat.com> <20190814161517.ldbn62mulk2pmqo5@wittgenstein> <20190814163443.6odsksff4jbta7be@wittgenstein> <20190814165501.GJ9017@brightrain.aerifal.cx> In-Reply-To: <20190814165501.GJ9017@brightrain.aerifal.cx> From: Linus Torvalds Date: Wed, 14 Aug 2019 10:06:19 -0700 Message-ID: Subject: Re: [PATCH v3 1/1] waitid: Add support for waiting for the current process group To: Rich Felker Cc: Christian Brauner , Oleg Nesterov , Linux List Kernel Mailing , GNU C Library , Alistair Francis , "Eric W. Biederman" , Arnd Bergmann , Adhemerval Zanella , Florian Weimer , Palmer Dabbelt , macro@wdc.com, Zong Li , Andrew Morton , Al Viro , Peter Anvin Content-Type: text/plain; charset="UTF-8" On Wed, Aug 14, 2019 at 9:55 AM Rich Felker wrote: > > I don't think "downsides" sufficiently conveys that this is hard > breakage of a requirement for waitpid. Well, let's be honest here. Who has _ever_ seen a signal handler changing the current process group? In fact, the SYSV version of setpgid() takes a process ID to set it *for somebody else*, so the signal safety is not even necessarily relevant, since it might be racing with _another_ thread doing it (which even the kernel side won't fix - it's just user space doing odd things). So yes - it's technically true that it's impossible to emulate properly in user space. But I doubt it makes _any_ difference what-so-ever, and glibc might as well do something like ret = waitid(P_PGID, 0, ..); if (ret == -EINVAL) { do the emulation } which makes it work with older kernels, and has zero downside in practice. Hmm? Linus