summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index d0499f236..87aaca73a 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1028,6 +1028,7 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
{
case TIOCGWINSZ:
case TIOCSWINSZ:
+ case TIOCLINUX:
break;
case FIONBIO:
set_nonblocking (*(int *) arg);
@@ -1071,6 +1072,21 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
WaitForSingleObject (ioctl_done_event, INFINITE);
}
break;
+ case TIOCLINUX:
+ int val = * (unsigned char *) arg;
+ if (val == 6 && ioctl_request_event && ioctl_done_event)
+ {
+ get_ttyp ()->arg.value = val;
+ SetEvent (ioctl_request_event);
+ WaitForSingleObject (ioctl_done_event, INFINITE);
+ * (unsigned char *) arg = get_ttyp ()->arg.value & 0xFF;
+ }
+ else
+ {
+ get_ttyp ()->ioctl_retval = -1;
+ set_errno (EINVAL);
+ }
+ break;
}
release_output_mutex ();