From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Spam-Status: No, score=-3639.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 07 Mar 2022 20:31:48 -0000 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