git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH 0/7] rework run_command error reporting
Date: Sat,  4 Jul 2009 21:26:36 +0200	[thread overview]
Message-ID: <cover.1246734159.git.j6t@kdbg.org> (raw)

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(-)

             reply	other threads:[~2009-07-04 19:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-04 19:26 Johannes Sixt [this message]
2009-07-04 19:26 ` [PATCH 1/7] Truncate result of run_command that is used in exit() to lowest 8 bits Johannes Sixt
2009-07-04 19:26   ` [PATCH 2/7] MinGW: simplify waitpid() emulation macros Johannes Sixt
2009-07-04 19:26     ` [PATCH 3/7] run_command: return exit code as positive value Johannes Sixt
2009-07-04 19:26       ` [PATCH 4/7] run_command: report system call errors instead of returning error codes Johannes Sixt
2009-07-04 19:26         ` [PATCH 5/7] run_command: encode deadly signal number in the return value Johannes Sixt
2009-07-04 19:26           ` [PATCH 6/7] run_command: report failure to execute the program, but optionally don't Johannes Sixt
2009-07-04 19:26             ` [PATCH/RFC 7/7] receive-pack: remove unnecessary run_status report Johannes Sixt
2009-07-05 19:01         ` [PATCH 4/7] run_command: report system call errors instead of returning error codes Johannes Sixt
2009-07-05 19:14           ` Junio C Hamano
2009-07-06  7:37         ` Johannes Sixt
2009-07-05 18:57   ` [Replacement PATCH 1/7] MinGW: truncate exit()'s argument to lowest 8 bits Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1246734159.git.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).