]> Savannah Git Hosting - gnulib.git/commit
spawn-pipe: Fix pipe-filter-* test hangs (regression 2020-12-24).
authorBruno Haible <bruno@clisp.org>
Fri, 9 Sep 2022 14:49:10 +0000 (16:49 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 9 Sep 2022 15:20:47 +0000 (17:20 +0200)
commit4ceb9126242ceecc87390896b158003d3709089c
tree508c5aae87e5c43d6212b9465e0b2246ec095c57
parentcee28058034b6b3dd717cfbdfe4147af062c6f26
spawn-pipe: Fix pipe-filter-* test hangs (regression 2020-12-24).

* lib/windows-spawn.h (struct inheritable_handles): Widen the per-fd
flags from 8 bits to 16 bits.
(KEEP_OPEN_IN_CHILD): New macro.
(init_inheritable_handles): Change description of what it does when
duplicate == true.
* lib/windows-spawn.c (init_inheritable_handles): If duplicate == true,
add all fds to the array, regardless whether they are scheduled to be
preserved in the child process.
(compose_handles_block): Update.
(spawnpvech): Update.
* lib/spawni.c (grow_inheritable_handles): Update.
(shrink_inheritable_handles): Also close the handles not marked with
KEEP_OPEN_IN_CHILD.
(do_open, do_dup2): Mark the new fd with KEEP_OPEN_IN_CHILD.
ChangeLog
lib/spawni.c
lib/windows-spawn.c
lib/windows-spawn.h