From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBA1DC07E9A for ; Mon, 12 Jul 2021 19:16:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0FF161241 for ; Mon, 12 Jul 2021 19:16:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236335AbhGLTTY (ORCPT ); Mon, 12 Jul 2021 15:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233183AbhGLTTX (ORCPT ); Mon, 12 Jul 2021 15:19:23 -0400 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE3D2C0613DD; Mon, 12 Jul 2021 12:16:34 -0700 (PDT) Received: by a3.inai.de (Postfix, from userid 25121) id 63C0659F3A1E9; Mon, 12 Jul 2021 21:16:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id 5F16460E710FD; Mon, 12 Jul 2021 21:16:33 +0200 (CEST) Date: Mon, 12 Jul 2021 21:16:33 +0200 (CEST) From: Jan Engelhardt To: Suren Baghdasaryan cc: Florian Weimer , Andrew Morton , Michal Hocko , Michal Hocko , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Rik van Riel , Minchan Kim , Christian Brauner , Christoph Hellwig , Oleg Nesterov , David Hildenbrand , Jann Horn , Shakeel Butt , Tim Murray , Linux API , linux-mm , LKML , kernel-team Subject: Re: [PATCH 1/1] mm: introduce process_reap system call In-Reply-To: Message-ID: References: <20210623192822.3072029-1-surenb@google.com> <87sg0qa22l.fsf@oldenburg.str.redhat.com> <87wnq1z7kl.fsf@oldenburg.str.redhat.com> User-Agent: Alpine 2.24 (LSU 510 2020-10-10) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 2021-07-12 20:39, Suren Baghdasaryan wrote: >> >> The way I understood the request is that a userspace program (or perhaps two, >> if so desired) should issue _two_ calls, one to deliver the signal, >> one to perform the reap portion: >> >> uinfo.si_code = SI_QUEUE; >> sigqueue(pid, SIGKILL, &uinfo); >> uinfo.si_code = SI_REAP; >> sigqueue(pid, SIGKILL, &uinfo); > >This approach would still lead to the same discussion: by design, >sigqueue/kill/pidfd_send_signal deliver the signal but do not wait for >the signal to be processed by the recipient. Oh, so the only reason not to do that is because there is some POSIX specification that says the sigqueue API should be non-waiting for all possible parameter values (with an implied "present and future values!"), not because there's some hurdle to actually add a wait inside within rt_sigqueueinfo if the REAP flag is set. Gotcha.