* 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.
This commit is contained in:
Christopher Faylor
2004-01-21 06:28:35 +00:00
parent 1284fa137f
commit bcb4223cbc
4 changed files with 32 additions and 11 deletions

View File

@ -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;
get_ttyp ()->arg.winsize = *(struct winsize *) arg;
if (ioctl_request_event)
{
get_ttyp ()->ioctl_retval = -EINVAL;
SetEvent (ioctl_request_event);
}
else
{
get_ttyp ()->arg.winsize = *(struct winsize *) arg;
SetEvent (ioctl_request_event);
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: