summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45c0961)
raw | patch | inline | side by side (parent: 45c0961)
author | Jeff King <peff@peff.net> | |
Wed, 28 Jan 2009 07:36:39 +0000 (02:36 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 28 Jan 2009 22:09:35 +0000 (14:09 -0800) |
run_command() returns a single integer specifying either an
error code or the exit status of the spawned program. The
only way to tell the difference is that the error codes are
outside of the allowed range of exit status values.
Rather than make each caller implement the test against a
magic limit, let's provide a macro.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
error code or the exit status of the spawned program. The
only way to tell the difference is that the error codes are
outside of the allowed range of exit status values.
Rather than make each caller implement the test against a
magic limit, let's provide a macro.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.h | patch | blob | history |
diff --git a/run-command.h b/run-command.h
index a8b0c209e9b7487ce3c2b214cbebe7ad4f97fd11..e90d9282ff5a0a6dde2d1a9813063a7b2c7bcf91 100644 (file)
--- a/run-command.h
+++ b/run-command.h
ERR_RUN_COMMAND_WAITPID_SIGNAL,
ERR_RUN_COMMAND_WAITPID_NOEXIT,
};
+#define IS_RUN_COMMAND_ERR(x) ((x) <= -ERR_RUN_COMMAND_FORK)
struct child_process {
const char **argv;