diff options
author | Mark Shinwell <shinwell@codesourcery.com> | 2006-06-01 10:30:51 +0000 |
---|---|---|
committer | Mark Shinwell <shinwell@gcc.gnu.org> | 2006-06-01 10:30:51 +0000 |
commit | ea60341e32df03bcef5985ec908b1f38e9a7892a (patch) | |
tree | 65214f176ae027d313b5e5f7a60900e75c43d3ef /libiberty/pexecute.txh | |
parent | 7d6d782d02ed4320a81e7e1d9caf526d583aae0a (diff) | |
download | gcc-ea60341e32df03bcef5985ec908b1f38e9a7892a.zip gcc-ea60341e32df03bcef5985ec908b1f38e9a7892a.tar.gz gcc-ea60341e32df03bcef5985ec908b1f38e9a7892a.tar.bz2 |
Patch to provide pex_run_in_environment.
* include/libiberty.h: Declare pex_run_in_environment.
libiberty:
* pex-common.c: New function pex_run_in_environment.
* pex-common.h: Add environment parameter to exec_child.
* pex-msdos.c: Add environment parameter to pex_msdos_exec_child.
* pex-djgpp.c: Add environment parameter to pex_djgpp_exec_child.
(pex_djgpp_exec_child): Pass environment to child process.
* pex-unix.c: Add environment parameter to pex_unix_exec_child.
(pex_unix_exec_child): Pass environment to child process.
* pex-win32.c: Add environment parameter to pex_win32_exec_child.
New function env_compare for comparing VAR=VALUE pairs.
(win32_spawn): Assemble environment block and pass to CreateProcess.
(spawn_script): Pass environment through to win32_spawn.
(pex_win32_exec_child): Pass environment through to spawn_script and
win32_spawn.
* functions.texi: Regenerate.
* pexecute.txh: Document pex_run_in_environment.
From-SVN: r114302
Diffstat (limited to 'libiberty/pexecute.txh')
-rw-r--r-- | libiberty/pexecute.txh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libiberty/pexecute.txh b/libiberty/pexecute.txh index 7d45576..d85ee59 100644 --- a/libiberty/pexecute.txh +++ b/libiberty/pexecute.txh @@ -130,6 +130,19 @@ value, or to 0 if there is no relevant @code{errno}. @end deftypefn +@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, char * const *@var{env}, int @var{env_size}, const char *@var{outname}, const char *@var{errname}, int *@var{err}) + +Execute one program in a pipeline, permitting the environment for the +program to be specified. Behaviour and parameters not listed below are +as for @code{pex_run}. + +@var{env} is the environment for the child process, specified as an array of +character pointers. Each element of the array should point to a string of the +form @code{VAR=VALUE}, with the exception of the last element that must be +@code{NULL}. + +@end deftypefn + @deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{in_name}) Return a stream for a temporary file to pass to the first program in |