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

Re: [PATCH] transport-helper: check when helpers fail

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 22, 2012, 11:50 UTC
Message-ID
<CAMP44s2XDkLhKkqvxnGH+U5X=42dXU1550xVQvyQk=WD2p0c6Q@mail.gmail.com>
In-Reply-To
<5084E931.3010809@viscovery.net>
On Mon, Oct 22, 2012 at 8:35 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Am 10/21/2012 21:19, schrieb Felipe Contreras:
Show 13 quoted lines
> I would expect the function to be usable in this way:
>
>         start_command(&proc);
>
>         loop {
>                 if (check_command(&proc))
>                         break;
>         }
>
>         finish_command(&proc);
>
> but it would require a bit more work because it would have to cache the
> exit status in struct child_process.

Yes, I would expect that as well. I just noticed transport-helper also fails with that, but some reason that's not enough to actually fail the tests, so something weird is going on.

> BTW, you should check for return value 0 from waitpid() explicitly.
Right.
> Another thought: In your use-case, isn't it so that it would be an error
> that the process exited for whatever reason? I.e., even if it exited with
> code 0 ("success"), it would be an error because it violated the protocol?
How is that violating the protocol?
-- 
Felipe Contreras
Previous: Johannes SixtNext: Johannes Sixt
Message 5 of 9 in “transport-helper: check when helpers fail”
  1. transport-helper: check when helpers failFelipe Contreras, Oct 21, 2012
  2. Junio C HamanoOct 21, 2012
  3. Felipe ContrerasOct 21, 2012
  4. Johannes SixtOct 22, 2012
  5. Felipe ContrerasOct 22, 2012
  6. Johannes SixtOct 22, 2012
  7. Felipe ContrerasOct 22, 2012
  8. Felipe ContrerasOct 22, 2012
  9. Felipe ContrerasOct 22, 2012

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.