From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by sourceware.org (Postfix) with ESMTPS id 16FDF3858415 for ; Wed, 9 Mar 2022 14:37:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16FDF3858415 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f46.google.com with SMTP id i8so3367680wrr.8 for ; Wed, 09 Mar 2022 06:37:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=jhyz8+k/G1HCSU29uK9YbNBwnTvkNfu5wzf1/oRGSOI=; b=F9XDrnR9mu3nfH0szfBHCmrMvfQ6g+eQcajhK3rW4IU8mED6E2rZr1VYidGGzprq+d ksce933SkD9Ixx/AjxBaK/LPjXSZ2q62oqafdfJcGElRv9cE8Skv3vNFzxgknWfoRn2O 6I2FH0NedNvGMY7BaaWtM0fQFnfeczjMkaZDZF8prgBrq7S+qBp4YJZ14DkZVStq8JxC jegmSTeH4KpNsg2emMWqBZJQIbKH4S73ujdh2TSrGg77hhjRBNb7PRzj3VGKQi3fQqXM P3QUPlrBLuAKKMY6edQ6zD2lOOnGiP1CaC142YWrHFOlp9wz4KXsxpAqI98kJgbLP7c0 Xxzw== X-Gm-Message-State: AOAM532doYXm7AQcML9smxT/Mv+g5/Mcy4MrFt16jeJ0MGzHJ8KJdqh/ gTz4jAWUFKoa2KlUJT6BcDDIVBLdak4= X-Google-Smtp-Source: ABdhPJy7cAbiLWRjOOudJG/FmH6tm82yfAThQSZ4OTKjJ6doC+LWMPqHJB/oODjmHerZPmUzF2LyLA== X-Received: by 2002:a05:6000:1788:b0:203:788b:899e with SMTP id e8-20020a056000178800b00203788b899emr2346445wrg.65.1646836628781; Wed, 09 Mar 2022 06:37:08 -0800 (PST) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id f18-20020a5d6652000000b001e669ebd528sm1968494wrw.91.2022.03.09.06.37.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Mar 2022 06:37:07 -0800 (PST) Message-ID: Date: Wed, 9 Mar 2022 14:37:05 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 07/11] Re-add zombie leader on exit, gdb/linux Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20220303144020.3601082-1-pedro@palves.net> <20220303144020.3601082-8-pedro@palves.net> <63334a7f-86fe-c036-035f-1aafde34f6a7@simark.ca> From: Pedro Alves In-Reply-To: <63334a7f-86fe-c036-035f-1aafde34f6a7@simark.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Wed, 09 Mar 2022 14:37:13 -0000 On 2022-03-07 20:31, Simon Marchi wrote: > 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. Yeah, it's pretty standard to use !WIFSTOPPED to mean "exited for any reason".