X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=run-command.h;h=7958eb1e0b7a927019460e06d7a01622eddf81df;hb=792d2370f975f032a708cb35044193b5b5310840;hp=ff090679a6fecd66bda4fba804a8ab6555571aa9;hpb=c746e44fb8e7cf738177fee8d861defd4203af55;p=git.git diff --git a/run-command.h b/run-command.h index ff090679a..7958eb1e0 100644 --- a/run-command.h +++ b/run-command.h @@ -15,8 +15,13 @@ struct child_process { const char **argv; pid_t pid; int in; + int out; + const char *dir; + const char *const *env; unsigned close_in:1; + unsigned close_out:1; unsigned no_stdin:1; + unsigned no_stdout:1; unsigned git_cmd:1; /* if this is to be git sub-command */ unsigned stdout_to_stderr:1; }; @@ -29,5 +34,12 @@ int run_command(struct child_process *); #define RUN_GIT_CMD 2 /*If this is to be git sub-command */ #define RUN_COMMAND_STDOUT_TO_STDERR 4 int run_command_v_opt(const char **argv, int opt); +int run_command_v_opt_cd(const char **argv, int opt, const char *dir); + +/* + * env (the environment) is to be formatted like environ: "VAR=VALUE". + * To unset an environment variable use just "VAR". + */ +int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env); #endif