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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 C1D5CC433E0 for ; Tue, 7 Jul 2020 01:50:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87BD2206F6 for ; Tue, 7 Jul 2020 01:50:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="Izv0B4f3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbgGGBuK (ORCPT ); Mon, 6 Jul 2020 21:50:10 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:56908 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbgGGBuJ (ORCPT ); Mon, 6 Jul 2020 21:50:09 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 7D95C68A19; Mon, 6 Jul 2020 21:50:07 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=bkFDUE/GtkxvZ5PbhKr9GB9TmnY=; b=Izv0B4 f3KTxZf9ed3xUKD5VEf64fUJgG8BkXmSq26MZe4QWd+GB0EhbWOBWxjWUxC9AEci N6YYTQmHgIjHAwl7R5O9m0DZy01wI+4mChA/zQgFuqVy/JkAwMtN/NupgqG0H2IH puK2oTUdYO6+5lH+mqrOVrh2Yfp8T70QgWNH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=AxqlCi4zwRwWAvngd1AZldmd5dPd7yyn G5mQGvKnVOuiUIJbTRfFX/1XN4FIJoZcNvDpy2pQ5SX7t2HAk8rY2OumXnD65je0 carvCjOFz8oGXN26PapLpM75Er/5wwHvC+kQ+0+6oE5YVtX1uUcn/8Csst0smkHn UgWyxMhRgNw= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 6C68A68A17; Mon, 6 Jul 2020 21:50:07 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id AC2A268A15; Mon, 6 Jul 2020 21:50:06 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff King Cc: trygveaa@gmail.com, git@vger.kernel.org, Johannes Schindelin , Jeff Hostetler , Heba Waly Subject: Re: [PATCH 1/2] Wait for child on signal death for aliases to builtins References: <20200704221839.421997-1-trygveaa@gmail.com> <20200706204106.GA85133@coredump.intra.peff.net> Date: Mon, 06 Jul 2020 18:50:05 -0700 In-Reply-To: <20200706204106.GA85133@coredump.intra.peff.net> (Jeff King's message of "Mon, 6 Jul 2020 16:41:06 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 2EDC61DE-BFF4-11EA-A93E-C28CBED8090B-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff King writes: > On Sun, Jul 05, 2020 at 12:18:37AM +0200, trygveaa@gmail.com wrote: > >> From: Trygve Aaberge >> >> When you hit ^C all the processes in the tree receives it. When a git >> command uses a pager, git ignores this and waits until the pager quits. >> However, when using an alias there is an additional process in the tree >> which didn't ignore the signal. That caused it to exit which in turn >> caused the pager to exit. This fixes that for aliases to builtins. >> >> This was originally fixed in 46df6906f3 (see that for a more in >> explanation), but broke by a regression in b914084007. > > Good catch. The regression is technically in b914084007, but the real > culprit is the extra (commented out) code path added in ee4512ed48 > (trace2: create new combined trace facility, 2019-02-22). True, as Dscho also mentioned. I'll just do "b914084007" => "ee4512ed48 and b914084007" while queueing. > Your fix here looks good, but it does make me wonder if we could avoid > or shrink this duplicate code path. I.e., could it just do the logging > necessary but still leave the actual process spawn to the > execv_dashed_external() below. It may be hard to untangle, though, so > certainly this makes sense in the meantime. It probably is a bit more involved than a typical low hanging fruit. I am OK to leave this for later clean-up. > A test would be nice, but I don't think it's very feasible for the same > reason mentioned in 46df6906f3. True. Thanks.