All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Calvin Wan <calvinwan@google.com>,
	 Matt Liberty <mliberty@precisioninno.com>,
	 Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v2] submodule status: propagate SIGPIPE
Date: Mon, 23 Sep 2024 09:26:43 -0700	[thread overview]
Message-ID: <xmqqo74e49q4.fsf@gitster.g> (raw)
In-Reply-To: <pull.1799.v2.git.1726925150113.gitgitgadget@gmail.com> (Phillip Wood via GitGitGadget's message of "Sat, 21 Sep 2024 13:25:49 +0000")

"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> It has been reported than running
>
>      git submodule status --recurse | grep -q ^+
>
> results in an unexpected error message
>
>     fatal: failed to recurse into submodule $submodule
>
> When "git submodule--helper" recurses into a submodule it creates a
> child process. If that process fails then the error message above is
> displayed by the parent. In the case above the child is killed by
> SIGPIPE as "grep -q" exits as soon as it sees the first match. Fix this
> by propagating SIGPIPE so that it is visible to the process running
> git. We could propagate other signals but I'm not sure there is much
> value in doing that. In the common case of the user pressing Ctrl-C or
> Ctrl-\ then SIGINT or SIGQUIT will be sent to the foreground process
> group and so the parent process will receive the same signal as the
> child.
>
> Reported-by: Matt Liberty <mliberty@precisioninno.com>
> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> ---
>     submodule status: propagate SIGPIPE
>     
>     Note that I haven't checked if any other submodule subcommands are
>     affected by this - I'll leave that to someone more familiar with the
>     code.

Thanks.  Queued.

      reply	other threads:[~2024-09-23 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 13:07 [PATCH] submodule status: propagate SIGPIPE Phillip Wood via GitGitGadget
2024-09-20 19:01 ` Junio C Hamano
2024-09-20 20:06 ` Junio C Hamano
2024-09-21 13:23   ` phillip.wood123
2024-09-21 13:25 ` [PATCH v2] " Phillip Wood via GitGitGadget
2024-09-23 16:26   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo74e49q4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=calvinwan@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=mliberty@precisioninno.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.