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

Re: [PATCH] ll-merge: killing the external merge driver aborts the merge

From
JHJoshua Hudson <jhudson@cedaron.com>
Date
Jun 27, 2023, 21:32 UTC
Message-ID
<e7e5809d-5405-1e0b-f4e7-2d97e6748a09@cedaron.com>
In-Reply-To
<xmqqilb8fvgu.fsf@gitster.g>
On 6/27/2023 2:26 PM, Junio C Hamano wrote:
Show 17 quoted lines
> Joshua Hudson <jhudson@cedaron.com> writes:
>
>> Try changing kill -9 $$ to exit 137 # 128 + 9
> Yeah, but then (1) we are not simulating a case where the external
> merge driver hits a segfault or receives a signal from outside and
> dies involuntarily, and (2) we are codifying that even on Windows,
> program that was killed by signal N must exit with 128 + N, and
> these are the reasons why I did not go that route.
>
> Stepping back a bit, how does one typically diagnose programatically
> on Windows, after "spawning" a separate program, if the program died
> involuntarily and/or got killed?  It does not have to be "exit with
> 128 + signal number"---as long as it can be done programatically and
> reliably, we would be happy.  The code to diagnose how the spawned
> program exited in run_command(), which is in finish_command() and
> then in wait_or_whine(), may have to be updated with such a piece of
> Windows specific knowledge.
abort() => 3
Killed => no you can't detect it
Faulted => exit code has the high bit set ( >= 0x8000000 )

My starting off with "the logical equivalent of calling abort()" has proven to be an unfortunate word choice. I need to harden up the exit pathway on my side _anyway_. An OOM at least does turn into Faulted.

Previous: Junio C Hamano
Message 15 of 15 in “Design issue in git merge driver interface”
  1. Joshua HudsonJun 22, 2023
  2. Junio C HamanoJun 22, 2023
  3. ll-merge: killing the external merge driver aborts the mergeJunio C Hamano, Jun 23, 2023
  4. Elijah NewrenJun 23, 2023
  5. Junio C HamanoJun 23, 2023
  6. Junio C HamanoJun 23, 2023
  7. Joshua HudsonJun 25, 2023
  8. Johannes SchindelinJun 27, 2023
  9. Joshua HudsonJun 27, 2023
  10. Junio C HamanoJun 27, 2023
  11. Joshua HudsonJun 27, 2023
  12. Junio C HamanoJun 27, 2023
  13. Joshua HudsonJun 27, 2023
  14. Junio C HamanoJun 27, 2023
  15. Joshua HudsonJun 27, 2023

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.