]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: pty: Fix script command crash on console in Win7.
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Sat, 14 May 2022 11:39:42 +0000 (20:39 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Sat, 14 May 2022 22:25:56 +0000 (07:25 +0900)
commitfaf1e11592569845d348650bc702f424edb1f2d8
treeef92d8ce95ee5b4083f952ead9ded9401cebdbbf
parent8f66bc28ae461763d1da91384a652512590eea16
Cygwin: pty: Fix script command crash on console in Win7.

- Previously, the command "cmd /c script -c cmd" in console of Win7
  crashes. This seems to be due to a bug (?) of AttachConsole().
  This patch adds workaround for this issue.

  Currently, pty reattaches to the console of the process which is
  predetermined by ConsoleProcessList() after temporarily attaching
  to another console. After that, the console output handle opened
  with the name "CONOUT$" may not be accessible in Win7.
  This seems to happen when the attached process does not have the
  same handle even if the console attached is the same. With this
  patch, cygwin-console-helper which is started when pty master is
  opened in console, is utilized to be a target process to which
  pty reattaches if the OS is Win7.
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/fhandler_tty.cc
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h
winsup/utils/mingw/cygwin-console-helper.cc
This page took 0.031426 seconds and 5 git commands to generate.