X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=run-command.h;h=56491b9f2344541c02bd0da2928a535f11193bd8;hb=6cdf0223fe4a9ccae543fece8b5e78a626ccdf89;hp=65ccb1c60f425d3fb612592178ac8cfd12a8c027;hpb=abf411e28d9df669b0e690578a1eb95c0bd29847;p=git.git diff --git a/run-command.h b/run-command.h index 65ccb1c60..56491b9f2 100644 --- a/run-command.h +++ b/run-command.h @@ -1,6 +1,10 @@ #ifndef RUN_COMMAND_H #define RUN_COMMAND_H +#ifndef NO_PTHREADS +#include +#endif + struct child_process { const char **argv; pid_t pid; @@ -33,6 +37,7 @@ struct child_process { unsigned git_cmd:1; /* if this is to be git sub-command */ unsigned silent_exec_failure:1; unsigned stdout_to_stderr:1; + unsigned use_shell:1; void (*preexec_cb)(void); }; @@ -46,6 +51,7 @@ extern int run_hook(const char *index_file, const char *name, ...); #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 +#define RUN_USING_SHELL 16 int run_command_v_opt(const char **argv, int opt); /* @@ -72,10 +78,10 @@ struct async { void *data; int in; /* caller writes here and closes it */ int out; /* caller reads from here and closes it */ -#ifndef WIN32 +#ifdef NO_PTHREADS pid_t pid; #else - HANDLE tid; + pthread_t tid; int proc_in; int proc_out; #endif