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

Re: [PATCH 0/5] ignore SIGINT while editor runs

From
Paul Fox <pgf@foxharp.boston.ma.us>
Date
Nov 11, 2012, 20:24 UTC
Message-ID
<20121111202419.7602E2E8B6A@grass.foxharp.boston.ma.us>
In-Reply-To
<20121111191520.GA9474@shrek.podlesie.net>
krzysztof wrote:
 > On Sun, Nov 11, 2012 at 11:31:00AM -0500, Jeff King wrote:
 > > 
 > > Here's a series that I think should resolve the situation for everybody.
 > > 
 > >   [1/5]: launch_editor: refactor to use start/finish_command
 > > 
 > > The cleanup I sent out a few minutes ago.
 > > 
 > >   [2/5]: launch_editor: ignore SIGINT while the editor has control
 > > 
 > > Paul's patch rebased on my 1/5.
 > > 
 > >   [3/5]: run-command: drop silent_exec_failure arg from wait_or_whine
 > >   [4/5]: run-command: do not warn about child death by SIGINT
 > >   [5/5]: launch_editor: propagate SIGINT from editor to git
 > > 
 > > Act more like current git when the editor dies from SIGINT.
 > > 
 > 
 > Looks ok, but what about SIGQUIT? Some editors like GNU ed (0.4 and 1.6)
 > ignore SIGQUIT, and after SIGQUIT git dies, but editor is still running.
 > After pressing any key ed receives -EIO and prints "stdin: Input/output
 > error". GNU ed 1.6 then exits, but ed 0.4 prints this error forever.
 > Maybe git should kill the editor in such case?

there's certainly lots of precedent for treating SIGINT and SIGQUIT the same. but there's also some merit to saying that if the user knows to send SIGQUIT instead of SIGINT, they may well have a reason. (after all, if we always treat them the same, there's no point in having both.)

the em editor (linus' microemacs) behaves as you describe ed 0.4 does, except without the error message -- it just spins silently getting EIO from reading stdin. i think em needs to be fixed, and it sounds like GNU ed already has been. (unless i misunderstand the relationship of 0.4 and 1.6.)

paul
 > 
 > Krzysiek
 > --
 > To unsubscribe from this list: send the line "unsubscribe git" in
 > the body of a message to majordomo@vger.kernel.org
 > More majordomo info at  http://vger.kernel.org/majordomo-info.html
=---------------------
 paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 57.2 degrees)
Previous: Krzysztof MazurNext: Krzysztof Mazur
Message 30 of 38 in “What's cooking in git.git (Nov 2012, #02; Fri, 9)”
  1. Jeff KingNov 9, 2012
  2. Ralf ThielowNov 9, 2012
  3. Ralf ThielowNov 9, 2012
  4. Jeff KingNov 9, 2012
  5. Junio C HamanoNov 9, 2012
  6. Jeff KingNov 10, 2012
  7. Junio C HamanoNov 10, 2012
  8. Kalle Olavi NiemitaloNov 9, 2012
  9. Paul FoxNov 10, 2012
  10. Kalle Olavi NiemitaloNov 10, 2012
  11. Andreas SchwabNov 10, 2012
  12. Paul FoxNov 10, 2012
  13. Kalle Olavi NiemitaloNov 11, 2012
  14. Andreas SchwabNov 11, 2012
  15. Jeff KingNov 11, 2012
  16. 0/5 ignore SIGINT while editor runsJeff King, Nov 11, 2012
  17. 1/5 launch_editor: refactor to use start/finish_commandJeff King, Nov 11, 2012
  18. 2/5 launch_editor: ignore SIGINT while the editor has controlPaul Fox, Nov 11, 2012
  19. Junio C HamanoNov 12, 2012
  20. Jeff KingNov 12, 2012
  21. 3/5 run-command: drop silent_exec_failure arg from wait_or_whineJeff King, Nov 11, 2012
  22. Felipe ContrerasNov 11, 2012
  23. 4/5 run-command: do not warn about child death by SIGINTJeff King, Nov 11, 2012
  24. 5/5 launch_editor: propagate SIGINT from editor to gitJeff King, Nov 11, 2012
  25. Johannes SixtNov 11, 2012
  26. Jeff KingNov 30, 2012
  27. 2/5 launch_editor: ignore SIGINT while the editor has controlJeff King, Nov 11, 2012
  28. Paul FoxNov 11, 2012
  29. Krzysztof MazurNov 11, 2012
  30. Paul FoxNov 11, 2012
  31. Krzysztof MazurNov 11, 2012
  32. Andreas SchwabNov 11, 2012
  33. Felipe ContrerasNov 9, 2012
  34. Jeff KingNov 10, 2012
  35. Felipe ContrerasNov 10, 2012
  36. SZEDER GáborNov 10, 2012
  37. Felipe ContrerasNov 10, 2012
  38. Junio C HamanoNov 10, 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.