diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2022-03-30 12:46:08 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2022-03-30 12:46:08 +0900 |
commit | 49a00a0673e7318f7f27719ab2f0ac8eb3c6b439 (patch) | |
tree | 78c58b9deaddb0faf3b9e7bd47ff3200b0f9f4dd /winsup | |
parent | be9c0561e7da91b2d5c589a43f9c0fea1e684f2d (diff) | |
download | newlib-49a00a0673e7318f7f27719ab2f0ac8eb3c6b439.zip newlib-49a00a0673e7318f7f27719ab2f0ac8eb3c6b439.tar.gz newlib-49a00a0673e7318f7f27719ab2f0ac8eb3c6b439.tar.bz2 |
Cygwin: pty: Fix crash on master close in Windows 7.
- The 4th parameter of WriteFile() cannot be NULL especially in
Windows 7 as mentioned in Microsoft documentation. This patch
fixes that.
Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251162.html
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/release/3.3.5 | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index e29b93c..4cb5f14 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2106,7 +2106,7 @@ fhandler_pty_master::close () } release_output_mutex (); get_ttyp ()->stop_fwd_thread = true; - WriteFile (to_master_nat, "", 0, NULL, NULL); + WriteFile (to_master_nat, "", 0, &len, NULL); master_fwd_thread->detach (); } } diff --git a/winsup/cygwin/release/3.3.5 b/winsup/cygwin/release/3.3.5 index d2a7f77..9d44c1b 100644 --- a/winsup/cygwin/release/3.3.5 +++ b/winsup/cygwin/release/3.3.5 @@ -43,3 +43,6 @@ Bug Fixes - Fix a formatting problem in gmondump where all displayed addresses are mistakenly prefixed with "0x0x". + +- Fix crash on pty master close in Windows 7. + Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251162.html |