summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-10 22:14:57 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-10 22:14:57 -0700
commit08ac69685a5b6bea45df1fd62ea1d9b7c0258d0b (patch)
tree3f3ccdcda78c82ed450666d22a0b463cf3eac6b3 /run-command.h
parent0c4f21e452dca5a705c36ca7e363c1a3b3c2a5b8 (diff)
parent0b91322311b649a4b5f9581fec2dca9e1c2da716 (diff)
downloadgit-08ac69685a5b6bea45df1fd62ea1d9b7c0258d0b.tar.gz
Merge branch 'js/run-command-updates'
* js/run-command-updates: api-run-command.txt: describe error behavior of run_command functions run-command.c: squelch a "use before assignment" warning receive-pack: remove unnecessary run_status report run_command: report failure to execute the program, but optionally don't run_command: encode deadly signal number in the return value run_command: report system call errors instead of returning error codes run_command: return exit code as positive value MinGW: simplify waitpid() emulation macros
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/run-command.h b/run-command.h
index e345502843..0c00b25ff2 100644
--- a/run-command.h
+++ b/run-command.h
@@ -1,17 +1,6 @@
#ifndef RUN_COMMAND_H
#define RUN_COMMAND_H
-enum {
- ERR_RUN_COMMAND_FORK = 10000,
- ERR_RUN_COMMAND_EXEC,
- ERR_RUN_COMMAND_PIPE,
- ERR_RUN_COMMAND_WAITPID,
- ERR_RUN_COMMAND_WAITPID_WRONG_PID,
- 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;
pid_t pid;
@@ -42,6 +31,7 @@ struct child_process {
unsigned no_stdout:1;
unsigned no_stderr:1;
unsigned git_cmd:1; /* if this is to be git sub-command */
+ unsigned silent_exec_failure:1;
unsigned stdout_to_stderr:1;
void (*preexec_cb)(void);
};
@@ -55,6 +45,7 @@ extern int run_hook(const char *index_file, const char *name, ...);
#define RUN_COMMAND_NO_STDIN 1
#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
#define RUN_COMMAND_STDOUT_TO_STDERR 4
+#define RUN_SILENT_EXEC_FAILURE 8
int run_command_v_opt(const char **argv, int opt);
/*