summaryrefslogtreecommitdiff
path: root/lib/windows-spawn.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-12-24 22:18:18 +0100
committerBruno Haible <bruno@clisp.org>2020-12-24 22:18:18 +0100
commitd1ae9c694e5418850c71884ccd22a293d9b3e29b (patch)
tree3b2a8768375f204947e28fa5aa6b1a2333621b32 /lib/windows-spawn.h
parentf8199b3ae12a94f79994e1c1e2389fe024ffa6fb (diff)
downloadgnulib-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.h7
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.