diff options
author | NIIBE Yutaka <[email protected]> | 2024-05-30 05:12:37 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2024-05-30 05:12:37 +0000 |
commit | adcb4170a40d7cf66181a6b3efc7c187892a1318 (patch) | |
tree | c6489d6e47af5574874cfff47657a04ea3c2936b /src/spawn-w32.c | |
parent | Fix process termination check at release. (diff) | |
download | libgpg-error-adcb4170a40d7cf66181a6b3efc7c187892a1318.tar.gz libgpg-error-adcb4170a40d7cf66181a6b3efc7c187892a1318.zip |
spawn: Allow NULL for ACT.
* src/spawn-posix.c (_gpgrt_process_spawn): ACT may be null.
* src/spawn-w32.c (_gpgrt_process_spawn): Likewise.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src/spawn-w32.c')
-rw-r--r-- | src/spawn-w32.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/spawn-w32.c b/src/spawn-w32.c index 4d41c21..139a71f 100644 --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -560,6 +560,15 @@ _gpgrt_process_spawn (const char *pgmname, const char *argv[], int i; BOOL ask_inherit = FALSE; BOOL allow_foreground_window = FALSE; + struct gpgrt_spawn_actions act_default; + + if (!act) + { + memset (&act_default, 0, sizeof (act_default)); + for (i = 0; i <= 2; i++) + act_default.hd[i] = INVALID_HANDLE_VALUE; + act = &act_default; + } /* Build the command line. */ ec = build_w32_commandline (pgmname, argv, &cmdline); |