]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: pipe: Avoid deadlock for non-cygwin writer.
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Tue, 22 Mar 2022 13:49:46 +0000 (22:49 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 1 Apr 2022 16:03:15 +0000 (01:03 +0900)
commite9c96f0a6daaad41920eea7ff84c8ce95918f1a3
tree5e701ced36486137fcb5e8f69798f8071bf9fe73
parentaac414986fcf5fd66b76d061eda3d3618d64eff1
Cygwin: pipe: Avoid deadlock for non-cygwin writer.

- As mentioned in commit message of the commit b531d6b0, if multiple
  writers including non-cygwin app exist, the non-cygwin app cannot
  detect pipe closure on the read side when the pipe is created by
  system account or the the pipe creator is running as service.
  This is because query_hdl which is held in write side also is a
  read end of the pipe, so the pipe is still alive for the non-cygwin
  app even after the reader is closed.

  To avoid this problem, this patch lets all processes in the same
  process group close query_hdl using newly introduced internal signal
  __SIGNONCYGCHLD when non-cygwin app is started.

  Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251097.html
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_pipe.cc
winsup/cygwin/release/3.3.5
winsup/cygwin/sigproc.cc
winsup/cygwin/sigproc.h
winsup/cygwin/spawn.cc
This page took 0.032082 seconds and 5 git commands to generate.