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:
parent
69ec3976d6
commit
2b4f986e49
@ -26,3 +26,8 @@ Bug Fixes
|
|||||||
- Fix a console problem that the text longer than 1024 bytes cannot
|
- Fix a console problem that the text longer than 1024 bytes cannot
|
||||||
be pasted correctly.
|
be pasted correctly.
|
||||||
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251764.html
|
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
|
||||||
|
@ -210,6 +210,11 @@ is_console_app (WCHAR *filename)
|
|||||||
if (p && p + id_offset <= buf + n)
|
if (p && p + id_offset <= buf + n)
|
||||||
return p[id_offset] == '\003'; /* 02: GUI, 03: console */
|
return p[id_offset] == '\003'; /* 02: GUI, 03: console */
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
wchar_t *e = wcsrchr (filename, L'.');
|
||||||
|
if (e && (wcscasecmp (e, L".bat") == 0 || wcscasecmp (e, L".cmd") == 0))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user