From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id njs2Nr5rJmJsFgAAWB0awg (envelope-from ) for ; Mon, 07 Mar 2022 15:31:58 -0500 Received: by simark.ca (Postfix, from userid 112) id CCD621EA69; Mon, 7 Mar 2022 15:31:58 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 65A151EA69 for ; Mon, 7 Mar 2022 15:31:58 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C90883857835 for ; Mon, 7 Mar 2022 20:31:57 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 8DE4B385841D for ; Mon, 7 Mar 2022 20:31:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8DE4B385841D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3AE281EA69; Mon, 7 Mar 2022 15:31:47 -0500 (EST) Message-ID: <63334a7f-86fe-c036-035f-1aafde34f6a7@simark.ca> Date: Mon, 7 Mar 2022 15:31:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 07/11] Re-add zombie leader on exit, gdb/linux Content-Language: tl To: Pedro Alves , gdb-patches@sourceware.org References: <20220303144020.3601082-1-pedro@palves.net> <20220303144020.3601082-8-pedro@palves.net> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-03-07 15:27, Pedro Alves wrote: > Hmm, can you clarify? We're doing this for both WIFEXITED and WIFSIGNALED. The > WIFSTOPPED case doesn't get here, it's handled in the if/then branch. I do think > we need to do this for exits due to WIFSIGNALED just the same. Do you think > otherwise? Ah I missed the WIFSTOPPED check above. The case I was thinking was "what if we get a WIFSTOPPED for a deleted zombie leader, that would probably be some problem in the kernel, we don't want to add it back". And I didn't think about WSIGNALED. So effectively, I was proposing to have: else if (WIFSIGNALED (status) || WIFEXITED (status) instead of an "else". But given that WIFSIGNALED and WIFEXITED are the only plausible alternatives to WIFSTOPPED, it's not really necessary. Simon