public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Takashi Yano <tyan0@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Fix crash on master close in Windows 7. Date: Wed, 30 Mar 2022 03:57:20 +0000 (GMT) [thread overview] Message-ID: <20220330035720.D32A63858C50@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c7300b91d026eb031ffe2864ab27fd859626bc8c commit c7300b91d026eb031ffe2864ab27fd859626bc8c Author: Takashi Yano <takashi.yano@nifty.ne.jp> Date: Wed Mar 30 12:46:08 2022 +0900 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 Diff: --- winsup/cygwin/fhandler_tty.cc | 2 +- winsup/cygwin/release/3.3.5 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f78dc7617..367525005 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2172,7 +2172,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 d2a7f772a..9d44c1b79 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
reply other threads:[~2022-03-30 3:57 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220330035720.D32A63858C50@sourceware.org \ --to=tyan0@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).