diff options
author | Bruno Haible <bruno@clisp.org> | 2020-12-24 22:18:18 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-12-24 22:18:18 +0100 |
commit | d1ae9c694e5418850c71884ccd22a293d9b3e29b (patch) | |
tree | 3b2a8768375f204947e28fa5aa6b1a2333621b32 /lib/windows-spawn.h | |
parent | f8199b3ae12a94f79994e1c1e2389fe024ffa6fb (diff) | |
download | gnulib-d1ae9c694e5418850c71884ccd22a293d9b3e29b.tar.gz |
windows-spawn: Export another auxiliary function.
* lib/windows-spawn.h (compose_envblock): New declaration.
* lib/windows-spawn.c (compose_envblock): New function, extracted from
spawnpvech.
(spawnpvech): Use it.
Diffstat (limited to 'lib/windows-spawn.h')
-rw-r--r-- | lib/windows-spawn.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/windows-spawn.h b/lib/windows-spawn.h index cb9d3fab12..90f45e15ea 100644 --- a/lib/windows-spawn.h +++ b/lib/windows-spawn.h @@ -72,6 +72,13 @@ extern const char ** prepare_spawn (const char * const *argv, NULL is returned, with errno set. */ extern char * compose_command (const char * const *argv); +/* Composes the block of memory that contains the environment variables. + ENVP must contain an environment (a NULL-terminated array of string of the + form VARIABLE=VALUE). + Returns a freshly allocated block of memory. In case of memory allocation + failure, NULL is returned, with errno set. */ +extern char * compose_envblock (const char * const *envp); + /* Creates a subprocess. MODE is either P_WAIT or P_NOWAIT. PROGNAME is the program to invoke. |