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

Re: What's cooking in git.git (Nov 2012, #02; Fri, 9)

From
KNKalle Olavi Niemitalo <kon@iki.fi>
Date
Nov 11, 2012, 07:02 UTC
Message-ID
<87wqxs4o6f.fsf@Niukka.kon.iki.fi>
In-Reply-To
<20121110220811.DC6A42E8B68@grass.foxharp.boston.ma.us>
Paul Fox <pgf@foxharp.boston.ma.us> writes:
> you're sending SIGINT to the cvs commit command, and that causes the
> editor to die right away?

That's right. It is not a quirk of shell-mode in Emacs, because I get the same result with ^C in xterm too.

% EDITOR="$HOME/prefix/x86_64-unknown-linux-gnu/bin/emacsclient --current-frame" % export EDITOR % cvs commit BUGIT Waiting for Emacs...^Ccvs commit: warning: editor session failed

Log message unchanged or not specified
a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
Action: (continue) a
cvs [commit aborted]: aborted by user
% 
While cvs was waiting from emacsclient:

% cat /proc/2030/stat 2030 (cvs) S 1849 2030 1849 34816 2030 4202496 598 0 0 0 0 0 0 0 20 0 1 0 94752537 34254848 410 18446744073709551615 140168182550528 140168183348316 140737407935424 140737407931680 140168163193950 0 0 6 20513 0 0 0 17 2 0 0 0 0 0 % grep 'Name\|Pid\|Sig' /proc/2030/status Name: cvs Pid: 2030 PPid: 1849 TracerPid: 0 SigQ: 0/28998 SigPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000000000006 SigCgt: 0000000180005021 % cat /proc/2031/stat 2031 (emacsclient) S 2030 2030 1849 34816 2030 4202496 155 0 0 0 0 0 0 0 20 0 1 0 94752538 4169728 81 18446744073709551615 4194304 4210620 140735996104016 140735996095456 140664960886018 0 0 0 0 0 0 0 17 1 0 0 0 0 0 % grep 'Name\|Pid\|Sig' /proc/2031/status Name: emacsclient Pid: 2031 PPid: 2030 TracerPid: 0 SigQ: 0/28998 SigPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000000000000 SigCgt: 0000000000000000 %

which I interpret to mean both processes were in process group 2030, the cvs process ignored SIGINT and SIGQUIT, the emacsclient process neither ignored nor handled any signals, and neither process blocked any signals (not even SIGCHLD as system(3) would). When ^C in the terminal sent SIGINT to the process group, it terminated the emacsclient process only.

If git did the same thing as cvs here, i.e. ignore the signals in the parent process only and check the exit status of the editor, I think that would be OK.

Previous: Paul FoxNext: Andreas Schwab
Message 13 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.