summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-01-21 06:28:35 +0000
committerChristopher Faylor <me@cgf.cx>2004-01-21 06:28:35 +0000
commitbcb4223cbc9de4519eefa039d142dd91df3c8318 (patch)
treee8325ef1f57b6ae10bd03618fe6de1e9e7c4a566 /winsup/cygwin/fhandler_tty.cc
parent1284fa137fafa9b8f4ea5539044b4cf7537a026f (diff)
downloadcygnal-bcb4223cbc9de4519eefa039d142dd91df3c8318.tar.gz
cygnal-bcb4223cbc9de4519eefa039d142dd91df3c8318.tar.bz2
cygnal-bcb4223cbc9de4519eefa039d142dd91df3c8318.zip
* 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. * sigproc.cc (pending_signals::save): New function. (pending_signals::restore): Ditto. (sig_clear): Save/restore current queue pointer. (wait_sig): Delete signals marked as such. * sigproc.h (__SIGDELETE): New enum.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 33c7f379d..4ca8de269 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;
killsys (-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: