Cygwin: console: Add guard for set/unset xterm compatible mode.

- Setting / unsetting xterm compatible mode may cause race issue
  between multiple processes. This patch adds guard for that.
This commit is contained in:
Takashi Yano
2020-02-18 18:12:54 +09:00
committed by Corinna Vinschen
parent 321d79abd3
commit 81b3440998
4 changed files with 103 additions and 58 deletions

View File

@ -1911,6 +1911,8 @@ class dev_console
bool raw_win32_keyboard_mode;
char cons_rabuf[40]; // cannot get longer than char buf[40] in char_command
char *cons_rapoi;
LONG xterm_mode_input;
LONG xterm_mode_output;
inline UINT get_console_cp ();
DWORD con_to_str (char *d, int dlen, WCHAR w);
@ -1983,6 +1985,7 @@ private:
static bool create_invisible_console (HWINSTA);
static bool create_invisible_console_workaround ();
static console_state *open_shared_console (HWND, HANDLE&, bool&);
void fix_tab_position (void);
public:
static pid_t tc_getpgid ()
@ -2072,6 +2075,9 @@ private:
size_t &raixput ();
size_t &rabuflen ();
void request_xterm_mode_input (bool);
void request_xterm_mode_output (bool);
friend tty_min * tty_list::get_cttyp ();
};