Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-21 09:28:00 +0300
committerChristopher Faylor <me@cgf.cx>2004-01-21 09:28:00 +0300
commit156547cefdca53fb092fd99ad7a0eef15745fb1f (patch)
tree510e8a4ad32683585ae40fcfdea51c58e3604e9f
parent2335399d221375b3856ab8bfcfc81fe497c79564 (diff)
* fhandler_tty.cc (fhandler_tty::ioctl): Semi-revert 2003-09-26 change for
TIOCSWINSZ. It is not an error for ioctl_request_event to be missing.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_tty.cc16
2 files changed, 15 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 94f4a9df2..82e8f581e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-21 Christopher Faylor <cgf@redhat.com>
+
+ * fhandler_tty.cc (fhandler_tty::ioctl): Semi-revert 2003-09-26 change
+ for TIOCSWINSZ. It is not an error for ioctl_request_event to be
+ missing.
+
2004-01-20 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (pending_signals::save): New function.
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index ef308b09a..122f3f33d 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1,6 +1,6 @@
/* fhandler_tty.cc
- Copyright 1997, 1998, 2000, 2001, 2002, 2003 Red Hat, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
This file is part of Cygwin.
@@ -1102,17 +1102,19 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
|| get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
{
- if (!ioctl_request_event)
- get_ttyp ()->ioctl_retval = -EINVAL;
- else
+ get_ttyp ()->arg.winsize = *(struct winsize *) arg;
+ if (ioctl_request_event)
{
- get_ttyp ()->arg.winsize = *(struct winsize *) arg;
+ get_ttyp ()->ioctl_retval = -EINVAL;
SetEvent (ioctl_request_event);
+ }
+ else
+ {
get_ttyp ()->winsize = *(struct winsize *) arg;
kill (-get_ttyp ()->getpgid (), SIGWINCH);
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
}
+ if (ioctl_done_event)
+ WaitForSingleObject (ioctl_done_event, INFINITE);
}
break;
case TIOCLINUX: