Cygwin: pty: Disable FreeConsole() on close for non cygwin process.

- After commit e1a0775dc0, the problem
  reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00093.html
  occurs. For Gnu scren and tmux, calling FreeConsole() on pty close
  is necessary. However, if FreeConsole() is called, cygwin setup
  with '-h' option does not work. Therefore, the commit
  e1a0775dc0 delayed closing pty.
  This is the cause of the problem above. Now, instead of delaying
  pty close, FreeConsole() is not called if the process is non cygwin
  processes such as cygwin setup.
This commit is contained in:
Takashi Yano
2020-01-10 20:46:26 +09:00
committed by Corinna Vinschen
parent 783eaa888f
commit 2f415d5efa
3 changed files with 16 additions and 4 deletions

View File

@ -2200,6 +2200,7 @@ class fhandler_pty_slave: public fhandler_pty_common
return get_ttyp ()->ti.c_lflag & ICANON;
}
void setup_locale (void);
void set_freeconsole_on_close (bool val);
};
#define __ptsname(buf, unit) __small_sprintf ((buf), "/dev/pty%d", (unit))