Add new simplified git-remote-testgit
[gitweb.git] / run-command.h
index 40db39cec0d4dcaac4de6e34d8734be14270552a..850c638f19a2b6776c0311db28371b18438f207a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef RUN_COMMAND_H
 #define RUN_COMMAND_H
 
-#ifdef ASYNC_AS_THREAD
+#ifndef NO_PTHREADS
 #include <pthread.h>
 #endif
 
@@ -38,7 +38,7 @@ struct child_process {
        unsigned silent_exec_failure:1;
        unsigned stdout_to_stderr:1;
        unsigned use_shell:1;
-       void (*preexec_cb)(void);
+       unsigned clean_on_exit:1;
 };
 
 int start_command(struct child_process *);
@@ -52,6 +52,7 @@ extern int run_hook(const char *index_file, const char *name, ...);
 #define RUN_COMMAND_STDOUT_TO_STDERR 4
 #define RUN_SILENT_EXEC_FAILURE 8
 #define RUN_USING_SHELL 16
+#define RUN_CLEAN_ON_EXIT 32
 int run_command_v_opt(const char **argv, int opt);
 
 /*
@@ -78,7 +79,7 @@ struct async {
        void *data;
        int in;         /* caller writes here and closes it */
        int out;        /* caller reads from here and closes it */
-#ifndef ASYNC_AS_THREAD
+#ifdef NO_PTHREADS
        pid_t pid;
 #else
        pthread_t tid;