4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-03-04 14:06:13 +08:00

Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin console app.

- If *.bat or *.cmd is executed directly from cygwin shell, pty
  failed to switch I/O pipe to that for native apps. This patch
  fixes the issue.
This commit is contained in:
Takashi Yano 2022-07-31 17:42:00 +09:00
parent 69ec3976d6
commit 2b4f986e49
2 changed files with 11 additions and 1 deletions

View File

@ -26,3 +26,8 @@ Bug Fixes
- Fix a console problem that the text longer than 1024 bytes cannot
be pasted correctly.
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251764.html
- Fix a pty problem that pty failed to switch I/O pipe to that for
native apps if *.bat or *.cmd is executed directly from cygwin
shell.
Addresses: https://cygwin.com/pipermail/cygwin/2022-July/251993.html

View File

@ -210,7 +210,12 @@ is_console_app (WCHAR *filename)
if (p && p + id_offset <= buf + n)
return p[id_offset] == '\003'; /* 02: GUI, 03: console */
else
return false;
{
wchar_t *e = wcsrchr (filename, L'.');
if (e && (wcscasecmp (e, L".bat") == 0 || wcscasecmp (e, L".cmd") == 0))
return true;
}
return false;
}
int