From: Johannes Sixt <j6t@kdbg.org>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: git@vger.kernel.org
Subject: [PATCH 0/4] Detect exec errors in start_command early
Date: Sun, 10 Jan 2010 14:04:21 +0100 [thread overview]
Message-ID: <201001101404.22258.j6t@kdbg.org> (raw)
In-Reply-To: <1263044757-12560-2-git-send-email-ilari.liusvaara@elisanet.fi>
On Samstag, 9. Januar 2010, Ilari Liusvaara wrote:
> 6 files changed, 282 insertions(+), 13 deletions(-)
IMHO, you are going completely overboard with your patch.
You check every single possible and unlikely error condition in the new code
that you introde, but ignore that there are quite a number of calls in the
existing code whose error conditions go checked.
And as a result, you "only" report errno values of some calls, and ignore that
there is at least one potential die() call hidden in execv_git_cmd(). IOW,
your code is not a catch-all and only an isolated solution.
I hope I can do better.
I developed this series on top of il/vcs-helper. But patches 1-3/4 are
actually an independent topic and also suitable to be merged into
jk/run-command-use-shell to implement improved DWIM whether a shell is
needed.
Patch 4/4 is to address your problem of weak error reporting with transport
helpers. I think I understand now what your problem is -- namely that
previously no error was reported if a transport helper program did not exist.
The reason for the missing error message is IMO a design weakness in the
protocol: It requires that the parent talks first - and by talking to an
early-died child process it dies from SIGPIPE. I experimented with
signal(SIGPIPE, SIG_IGN) to get around this, but it didn't work (the SIGPIPE
arrived anyway).
Anyway, patch 4/4 goes on top of il/vcs-helper after merging the topic
consisting of 1-3/4.
Ilari Liusvaara (1):
Improve error message when a transport helper was not found
Johannes Sixt (3):
start_command: report child process setup errors to the parent's
stderr
run-command: move wait_or_whine earlier
start_command: detect execvp failures early
Makefile | 1 +
run-command.c | 177
+++++++++++++++++++++++++++++++++++-------------
t/t0061-run-command.sh | 14 ++++
test-run-command.c | 35 ++++++++++
transport-helper.c | 14 +++-
5 files changed, 191 insertions(+), 50 deletions(-)
create mode 100755 t/t0061-run-command.sh
create mode 100644 test-run-command.c
next prev parent reply other threads:[~2010-01-10 13:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 13:45 [RFC PATCH v2 0/2] Imporove remote helper exec failure reporting Ilari Liusvaara
2010-01-09 13:45 ` [RFC PATCH v2 1/2] Report exec errors from run-command Ilari Liusvaara
2010-01-10 13:04 ` Johannes Sixt [this message]
2010-01-10 13:07 ` [PATCH 1/4] start_command: report child process setup errors to the parent's stderr Johannes Sixt
2010-01-10 13:08 ` [PATCH 2/4] run-command: move wait_or_whine earlier Johannes Sixt
2010-01-10 13:11 ` [PATCH 3/4] start_command: detect execvp failures early Johannes Sixt
2010-01-14 21:31 ` Junio C Hamano
2010-01-14 21:53 ` Johannes Sixt
2010-01-14 22:40 ` Junio C Hamano
2010-01-10 13:18 ` [PATCH 4/4] Improve error message when a transport helper was not found Johannes Sixt
2010-01-09 13:45 ` [RFC PATCH v2 2/2] Improve transport helper exec failure reporting Ilari Liusvaara
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=201001101404.22258.j6t@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=ilari.liusvaara@elisanet.fi \
/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).