This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH v2 0/1] Cygwin: pty: Limit API hook to the program linked with the APIs.
- From: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- To: cygwin-patches at cygwin dot com
- Cc: Takashi Yano <takashi dot yano at nifty dot ne dot jp>
- Date: Wed, 4 Sep 2019 22:46:50 +0900
- Subject: [PATCH v2 0/1] Cygwin: pty: Limit API hook to the program linked with the APIs.
- Dkim-filter: OpenDKIM Filter v2.10.3 conuserg-01.nifty.com x84DkqTY014967
- API hook used for pseudo console support causes slow down.
This patch limits API hook to only program which is linked
with the corresponding APIs. Normal cygwin program is not
linked with such APIs (such as WriteFile, etc...) directly,
therefore, no slow down occurs. However, console access by
cygwin.dll itself cannot switch the r/w pipe to pseudo console
side. Therefore, the code to switch it forcely to pseudo
console side is added to smallprint.cc and strace.cc.
v2:
Unify set_ishybrid_and_switch_to_pcon() and CHK_CONSOLE_ACCESS()
because they have exactly the same functionality.
Takashi Yano (1):
Cygwin: pty: Limit API hook to the program linked with the APIs.
winsup/cygwin/fhandler_tty.cc | 106 +++++++++++++++++++---------------
winsup/cygwin/smallprint.cc | 2 +
winsup/cygwin/strace.cc | 26 +--------
winsup/cygwin/winsup.h | 3 +
4 files changed, 66 insertions(+), 71 deletions(-)
--
2.21.0