* fhandler_console.cc (fhandler_console::ioctl): Fetch console events
using PeekConsoleInput and return only key down events in buf. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Always return EINVAL if PeekNamedPipe fails. (fhandler_pty_master::ioctl): Ditto.
This commit is contained in:
@@ -981,7 +981,7 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg)
|
||||
int n;
|
||||
if (!PeekNamedPipe (get_handle (), NULL, 0, NULL, (DWORD *) &n, NULL))
|
||||
{
|
||||
__seterrno ();
|
||||
set_errno (EINVAL);
|
||||
retval = -1;
|
||||
}
|
||||
else
|
||||
@@ -1381,7 +1381,7 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
|
||||
int n;
|
||||
if (!PeekNamedPipe (to_master, NULL, 0, NULL, (DWORD *) &n, NULL))
|
||||
{
|
||||
__seterrno ();
|
||||
set_errno (EINVAL);
|
||||
return -1;
|
||||
}
|
||||
*(int *) arg = n;
|
||||
|
Reference in New Issue
Block a user