public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: pty: Speed up a little hooked Win32 API for pseudo console.
@ 2019-09-04 10:04 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-09-04 10:04 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bddb018e10e90ea300537d5a13999558b7dce476

commit bddb018e10e90ea300537d5a13999558b7dce476
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Wed Sep 4 10:44:24 2019 +0900

    Cygwin: pty: Speed up a little hooked Win32 API for pseudo console.
    
    - Some Win32 APIs are hooked in pty code for pseudo console support.
      This causes slow down. This patch improves speed a little.

Diff:
---
 winsup/cygwin/fhandler_tty.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 4dbe96b..94ef2f8 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -155,7 +155,9 @@ DEF_HOOK (PeekConsoleInputW);
 #define CHK_CONSOLE_ACCESS(h) \
 { \
   DWORD dummy; \
-  if (!isHybrid && GetConsoleMode (h, &dummy)) \
+  if (!isHybrid \
+      && GetFileType (h) == FILE_TYPE_CHAR \
+      && GetConsoleMode (h, &dummy)) \
     { \
       isHybrid = true; \
       set_switch_to_pcon (); \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-04 10:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 10:04 [newlib-cygwin] Cygwin: pty: Speed up a little hooked Win32 API for pseudo console Corinna Vinschen

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).