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

[PATCH 0/7] rework run_command error reporting

From
Johannes Sixt <j6t@kdbg.org>
Date
Jul 4, 2009, 19:26 UTC
Message-ID
<cover.1246734159.git.j6t@kdbg.org>

I got tired of thinking about which return values of run_command functions are exit codes and which are error codes of system call failures.

Furthermore, it is a pitty that almost no run_command callers correctly report system call failures.

But on top of all I find it unacceptable that recent git-daemon logs "unable to run 'git-pack-objects'" if a client terminates the connection early.

This series addresses these issues, and also fixes an error in git-bisect on Windows.

1/7 Truncate result of run_command that is used in exit() to lowest 8 bits
    This one fixes a breakage of git-bisect on Windows and should be
    applied at any rate.

2/7 MinGW: simplify waitpid() emulation macros 3/7 run_command: return exit code as positive value 4/7 run_command: report system call errors instead of returning error codes

    These address the mentioned issues; 4/7 is the important change.

5/7 run_command: encode deadly signal number in the return value 6/7 run_command: report failure to execute the program, but optionally don't

    These two are nice to have.
7/7 receive-pack: remove unnecessary run_status report
    This one is actually RFC because it removes a status report that users
    might be used to see, or even depend on.
 bisect.c                     |    4 +-
 builtin-add.c                |    2 +-
 builtin-merge.c              |    2 +-
 builtin-receive-pack.c       |   38 ++--------------
 compat/mingw.h               |    5 +-
 convert.c                    |    2 +-
 git.c                        |   10 +---
 ll-merge.c                   |    4 --
 run-command.c                |  105 +++++++++++++++++++++++------------------
 run-command.h                |   13 +----
 t/t5530-upload-pack-error.sh |    5 ++-
 transport.c                  |   16 +------
 12 files changed, 81 insertions(+), 125 deletions(-)
Next: Johannes Sixt
Message 1 of 12 in “rework run_command error reporting”
  1. 0/7 rework run_command error reportingJohannes Sixt, Jul 4, 2009
  2. 1/7 Truncate result of run_command that is used in exit() to lowest 8 bitsJohannes Sixt, Jul 4, 2009
  3. 2/7 MinGW: simplify waitpid() emulation macrosJohannes Sixt, Jul 4, 2009
  4. 3/7 run_command: return exit code as positive valueJohannes Sixt, Jul 4, 2009
  5. 4/7 run_command: report system call errors instead of returning error codesJohannes Sixt, Jul 4, 2009
  6. 5/7 run_command: encode deadly signal number in the return valueJohannes Sixt, Jul 4, 2009
  7. 6/7 run_command: report failure to execute the program, but optionally don'tJohannes Sixt, Jul 4, 2009
  8. 7/7 receive-pack: remove unnecessary run_status reportJohannes Sixt, Jul 4, 2009
  9. Johannes SixtJul 5, 2009
  10. Junio C HamanoJul 5, 2009
  11. Johannes SixtJul 6, 2009
  12. 1/7 MinGW: truncate exit()'s argument to lowest 8 bitsJohannes Sixt, Jul 5, 2009

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.