]> 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>
Sat, 10 Sep 2022 01:06:19 +0000 (03:06 +0200)
commiteb041bb223c6ace6eed5c2c000d5b20dd2946df6
tree6f45289d78e4ce8a01e56542a4bb7bcf355b7433
parent136a89768bdf55350a09b260b7940d1a92b933d4
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