]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: pipe: Introduce temporary query_hdl.
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Mon, 20 Sep 2021 23:02:43 +0000 (08:02 +0900)
committerKen Brown <kbrown@cornell.edu>
Tue, 21 Sep 2021 18:47:33 +0000 (14:47 -0400)
commitb531d6b06eeb9abad9ba3e41171e23a94c593b0d
treed1428c82206c5bee91a1ee0358750533449f531c
parent643db9ec9e13724ff9cb7254bbfdc292463627a5
Cygwin: pipe: Introduce temporary query_hdl.

- The commit f79a4611 introduced query_hdl, which is the read pipe
  handle kept in the write pipe instance in order to determine if
  the pipe is ready to write in select().  This implementation has
  a potential risk that the write side fails to detect the closure
  of the read side if more than one writer exists and one of them
  is a non-cygwin process.

  With this patch, the strategy of commit f79a4611 is used only if
  the process is running as a service.  For a normal process,
  instead of keeping query_hdl in the write pipe instance, it is
  retrieved temporarily when select() is called.  Actually, we
  want to use tenporary query_hdl for all processes, however, it
  does not work for service processes due to OpenProcess()
  failure.
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_pipe.cc
winsup/cygwin/ntdll.h
winsup/cygwin/select.cc
This page took 0.028804 seconds and 5 git commands to generate.