* fhandler_tty.cc (fhandler_tty_slave::ioctl): Do nothing if the new window
size is equal to the old one. Send SIGWINCH if slave connected to a pseudo tty. (fhandler_pty_master::ioctl): Do nothing if the new window size is equal to the old one.
This commit is contained in:
parent
3593c18730
commit
2601ab5778
@ -1,3 +1,11 @@
|
|||||||
|
2002-11-03 Sergey Okhapkin <sos@prospect.com.ru>
|
||||||
|
|
||||||
|
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Do nothing if the new
|
||||||
|
window size is equal to the old one. Send SIGWINCH if slave connected
|
||||||
|
to a pseudo tty.
|
||||||
|
(fhandler_pty_master::ioctl): Do nothing if the new window size is
|
||||||
|
equal to the old one.
|
||||||
|
|
||||||
2002-10-31 Pierre Humblet <pierre.humblet@ieee.org>
|
2002-10-31 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::open): Verify pc isn't NULL.
|
* fhandler.cc (fhandler_base::open): Verify pc isn't NULL.
|
||||||
|
@ -955,12 +955,23 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
|
|||||||
get_ttyp ()->winsize = get_ttyp ()->arg.winsize;
|
get_ttyp ()->winsize = get_ttyp ()->arg.winsize;
|
||||||
break;
|
break;
|
||||||
case TIOCSWINSZ:
|
case TIOCSWINSZ:
|
||||||
get_ttyp ()->ioctl_retval = -1;
|
if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
|
||||||
|
|| get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
|
||||||
|
{
|
||||||
get_ttyp ()->arg.winsize = *(struct winsize *) arg;
|
get_ttyp ()->arg.winsize = *(struct winsize *) arg;
|
||||||
if (ioctl_request_event)
|
if (ioctl_request_event)
|
||||||
|
{
|
||||||
|
get_ttyp ()->ioctl_retval = -1;
|
||||||
SetEvent (ioctl_request_event);
|
SetEvent (ioctl_request_event);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
get_ttyp ()->winsize = *(struct winsize *) arg;
|
||||||
|
kill (-get_ttyp ()->getpgid (), SIGWINCH);
|
||||||
|
}
|
||||||
if (ioctl_done_event)
|
if (ioctl_done_event)
|
||||||
WaitForSingleObject (ioctl_done_event, INFINITE);
|
WaitForSingleObject (ioctl_done_event, INFINITE);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1103,8 +1114,12 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
|
|||||||
* (struct winsize *) arg = get_ttyp ()->winsize;
|
* (struct winsize *) arg = get_ttyp ()->winsize;
|
||||||
break;
|
break;
|
||||||
case TIOCSWINSZ:
|
case TIOCSWINSZ:
|
||||||
|
if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
|
||||||
|
|| get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
|
||||||
|
{
|
||||||
get_ttyp ()->winsize = * (struct winsize *) arg;
|
get_ttyp ()->winsize = * (struct winsize *) arg;
|
||||||
kill (-get_ttyp ()->getpgid (), SIGWINCH);
|
kill (-get_ttyp ()->getpgid (), SIGWINCH);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case FIONBIO:
|
case FIONBIO:
|
||||||
set_nonblocking (*(int *) arg);
|
set_nonblocking (*(int *) arg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user