diff options
Diffstat (limited to 'support/support_subprocess.c')
-rw-r--r-- | support/support_subprocess.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/support/support_subprocess.c b/support/support_subprocess.c index 2acfc57b7e..89e767ae47 100644 --- a/support/support_subprocess.c +++ b/support/support_subprocess.c @@ -93,6 +93,19 @@ support_subprogram (const char *file, char *const argv[]) } int +support_subprogram_wait (const char *file, char *const argv[]) +{ + posix_spawn_file_actions_t fa; + + posix_spawn_file_actions_init (&fa); + struct support_subprocess res = support_subprocess_init (); + + res.pid = xposix_spawn (file, &fa, NULL, argv, environ); + + return support_process_wait (&res); +} + +int support_process_wait (struct support_subprocess *proc) { xclose (proc->stdout_pipe[0]); |