git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] submodule status: propagate SIGPIPE

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 23, 2024, 16:26 UTC
Message-ID
<xmqqo74e49q4.fsf@gitster.g>
In-Reply-To
<pull.1799.v2.git.1726925150113.gitgitgadget@gmail.com>
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 29 quoted lines
> 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.
Previous: Phillip Wood via GitGitGadget
Message 6 of 6 in “submodule status: propagate SIGPIPE”
  1. submodule status: propagate SIGPIPEPhillip Wood via GitGitGadget, Sep 20, 2024
  2. Junio C HamanoSep 20, 2024
  3. Junio C HamanoSep 20, 2024
  4. phillip.wood123@gmail.comSep 21, 2024
  5. submodule status: propagate SIGPIPEPhillip Wood via GitGitGadget, Sep 21, 2024
  6. Junio C HamanoSep 23, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.