summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-10-11 23:20:38 +0000
committerChristopher Faylor <me@cgf.cx>2011-10-11 23:20:38 +0000
commit4add6f8db15841278eac9e5bd90f7361881ab226 (patch)
treebd738ee900b7d99aa2909c08e7f2469f9ca35c0a /winsup/cygwin/fhandler.cc
parent14b9008cca69dc6aaa2dec9954d8687437a25fbb (diff)
downloadcygnal-4add6f8db15841278eac9e5bd90f7361881ab226.tar.gz
cygnal-4add6f8db15841278eac9e5bd90f7361881ab226.tar.bz2
cygnal-4add6f8db15841278eac9e5bd90f7361881ab226.zip
* cygwin.din: Remove some _tc* exports. Add tcgetsid().
* dtable.cc (fh_alloc): Revert ill-advised setting of major/minor. Use new is_dev_tty to remember that this device was opened as /dev/tty. * fhandler.cc (fhandler_base::fstat): Remove leftover debugging statement. (fhandler_base::tcgetsid): New function. * fhandler.h ((fhandler_base::tcgetsid): Declare new function. (fhandler_base::is_dev_tty): Ditto. (fhandler_termios::opened_as_dev_tty): Declare new field. (fhandler_termios::is_dev_tty): Declare new function. (fhandler_termios::tcgetsid): Ditto. (fhandler_pty_common::use_archetype): Move here from subclass. (fhandler_pty_slave::use_archetype): Move up. (fhandler_pty_master::use_archetype): Ditto. * fhandler_console.cc (fhandler_console::ioctl): Rename second argument from `buf' to `arg' for consistency. Call ioctl_termios for common fhandler_termios ioctl handling. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Call ioctl_termios for common fhandler_termios ioctl handling. (fhandler_pty_master::ioctl): Ditto. * fhandler_termios.cc (fhandler_termios::tcgetsid): Implement new function. (fhandler_termios::ioctl_termios): Ditto. Implements TIOCSCTTY handling. * syscalls.cc (stat_worker): Set /dev/tty device info when appropriate. * termios.cc (tcgetpgrp): Avoid extraneous "isatty" check. (tcgetsid): Implement new function. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 253. * include/sys/termios.h (TIOCSCTTY): Define.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 23e631e0f..f53a12419 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1167,6 +1167,7 @@ fhandler_base::ioctl (unsigned int cmd, void *buf)
res = 0;
break;
case FIONREAD:
+ case TIOCSCTTY:
set_errno (ENOTTY);
res = -1;
break;
@@ -1190,8 +1191,6 @@ fhandler_base::lock (int, struct __flock64 *)
int __stdcall
fhandler_base::fstat (struct __stat64 *buf)
{
- debug_printf ("here");
-
if (is_fs_special ())
return fstat_fs (buf);
@@ -1391,6 +1390,13 @@ fhandler_base::tcgetpgrp ()
return -1;
}
+int
+fhandler_base::tcgetsid ()
+{
+ set_errno (ENOTTY);
+ return -1;
+}
+
void
fhandler_base::operator delete (void *p)
{