Cygwin: pty: Fix a possible race issue in initialization of pcon.
commit51095fe2ba9d109e34251d7221fe0bf768ec749b
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 4 Mar 2022 13:02:35 +0000 (4 22:02 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Fri, 4 Mar 2022 13:23:39 +0000 (4 22:23 +0900)
tree0a75ec7579e7bbc7350ffa8866b20d1ccd6a52c4
parent3d46583d4fa89f1c188bb169da939d769765bc67
Cygwin: pty: Fix a possible race issue in initialization of pcon.

- Currently, tty::pcon_start flag is cleared before transfer_input()
  in master::write(), however, the code in setup_pseudoconsole()
  waits for transfer_input() using tty::pcon_start. This possibly
  causes the race issue. The patch fixes this potential issue.
winsup/cygwin/fhandler_tty.cc