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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 8E18F1F9F4 for ; Mon, 22 Nov 2021 19:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239722AbhKVTO1 (ORCPT ); Mon, 22 Nov 2021 14:14:27 -0500 Received: from cloud.peff.net ([104.130.231.41]:36592 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239713AbhKVTO0 (ORCPT ); Mon, 22 Nov 2021 14:14:26 -0500 Received: (qmail 22070 invoked by uid 109); 22 Nov 2021 19:11:19 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Mon, 22 Nov 2021 19:11:19 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 23869 invoked by uid 111); 22 Nov 2021 19:11:19 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 22 Nov 2021 14:11:19 -0500 Authentication-Results: peff.net; auth=none Date: Mon, 22 Nov 2021 14:11:18 -0500 From: Jeff King To: Junio C Hamano Cc: SZEDER =?utf-8?B?R8OhYm9y?= , git@vger.kernel.org, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Subject: Re: [PATCH] t7006: clean up SIGPIPE handling in trace2 tests Message-ID: References: <20211024170349.GA2101@szeder.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sun, Nov 21, 2021 at 09:49:32PM -0800, Junio C Hamano wrote: > > That's a lot more tedious "if (!in_signal)" checks, but: > > > > - we don't have to duplicate any of the actual application logic > > > > - we'd now cover the extra cases for waitpid failing or returning the > > wrong pid (previously if waitpid() failed we'd still look at status, > > which could contain complete garbage!) > > Yeah, the repeated "if (!in_signal)" look a bit ugly, but fixing > that "we only deal with ifexited in in_signal case" to do the right > thing would make the code even more annoying and harder to maintain. OK. Let me see if I can clean this up into a full series that actually fixes the race you saw, and breaks down the other fixes a bit more. -Peff