aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2026-05-18 08:03:58 +0200
committerNIIBE Yutaka <[email protected]>2026-05-18 08:03:58 +0200
commit28de236495a89d009135177460abed6d4b5369e5 (patch)
tree1e0d6ad08eed485d4ddfd82361fcb258349933f8
parentw32:io: Serialize the access to ctx->* between reader/writer and io. (diff)
parentio:w32:spawn_sans_helper: Fix inherit of HANDLES to child process. (diff)
downloadgpgme-gniibe/t8264.tar.gz
gpgme-gniibe/t8264.zip
Merge commit '16821293' into gniibe/t8264gniibe/t8264
-rw-r--r--src/w32-io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/w32-io.c b/src/w32-io.c
index e772be9a..3d4a4a03 100644
--- a/src/w32-io.c
+++ b/src/w32-io.c
@@ -1484,13 +1484,6 @@ _gpgme_io_spawn_sans_helper (const char *path, char *const spawn_argv[],
std_hd++;
}
- idx = fd_list[i].arg_loc;
- if (idx == 0)
- continue;
- if (idx >= argc)
- /* something goes wrong, ignore. */
- continue;
-
if (!std_hd)
{
if (inherit_hd < DIM (handles) - 1)
@@ -1505,6 +1498,13 @@ _gpgme_io_spawn_sans_helper (const char *path, char *const spawn_argv[],
}
}
+ idx = fd_list[i].arg_loc;
+ if (idx == 0)
+ continue;
+ if (idx >= argc)
+ /* something goes wrong, ignore. */
+ continue;
+
/* Fix the arg at ARG_LOC. */
if (spawn_argv[idx][0] == '-' && spawn_argv[idx][1] == '&')
r = snprintf (p, MAX_ARG_STR, "-&" FMT_HD, (uintptr_t)hd);