mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
common/exechelp: Fix opening the 'nul' device.
* common/exechelp-w32.c (gnupg_spawn_process): Fix opening the 'nul' device. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
f5a4b6a3a3
commit
8857590006
@ -483,12 +483,12 @@ gnupg_spawn_process (const char *pgmname, const char *argv[],
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (inpipe[0] != INVALID_HANDLE_VALUE)
|
||||
if (inpipe[0] == INVALID_HANDLE_VALUE)
|
||||
nullhd[0] = w32_open_null (0);
|
||||
if (outpipe[1] != INVALID_HANDLE_VALUE)
|
||||
nullhd[1] = w32_open_null (0);
|
||||
if (errpipe[1] != INVALID_HANDLE_VALUE)
|
||||
nullhd[2] = w32_open_null (0);
|
||||
if (outpipe[1] == INVALID_HANDLE_VALUE)
|
||||
nullhd[1] = w32_open_null (1);
|
||||
if (errpipe[1] == INVALID_HANDLE_VALUE)
|
||||
nullhd[2] = w32_open_null (1);
|
||||
|
||||
/* Start the process. Note that we can't run the PREEXEC function
|
||||
because this might change our own environment. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user