(inspired by a patch from Egor Duda)

* select.cc (fhandler_tty_slave::ready_for_read): Remove.
* fhandler.h (fhandler_tty_slave::ready_for_read): Remove declaration.
* fhandler_tty.cc (fhandler_tty_slave::read): Don't do anything special with
vtime when vmin == 0.
* autoload.cc (GetConsoleWindow): Correct parameter count.
This commit is contained in:
Christopher Faylor 2002-08-31 03:35:50 +00:00
parent f80e156de9
commit 7a1174dcf2
5 changed files with 22 additions and 45 deletions

View File

@ -1,8 +1,21 @@
2002-08-30 Christopher Faylor <cgf@redhat.com>
(inspired by a patch from Egor Duda)
* select.cc (fhandler_tty_slave::ready_for_read): Remove.
* fhandler.h (fhandler_tty_slave::ready_for_read): Remove declaration.
* fhandler_tty.cc (fhandler_tty_slave::read): Don't do anything special
with vtime when vmin == 0.
2002-07-25 Egor Duda <deo@logos-m.ru>
* autoload.cc (GetConsoleWindow): Correct parameter count.
2002-08-30 Christopher January <chris@atomice.net>
Christopher Faylor <cgf@redhat.com>
* tty.cc (tty_list::allocate_tty): Use GetConsoleWindow, if available.
Call FindWindow in a loop.
* autoload.cc (GetConsoleWindow): Export
2002-08-30 Christopher Faylor <cgf@redhat.com>

View File

@ -494,7 +494,7 @@ LoadDLLfunc (CoCreateInstance, 20, ole32)
LoadDLLfuncEx (CancelIo, 4, kernel32, 1)
LoadDLLfuncEx (CreateHardLinkA, 12, kernel32, 1)
LoadDLLfuncEx (CreateToolhelp32Snapshot, 8, kernel32, 1)
LoadDLLfuncEx (GetConsoleWindow, 4, kernel32, 1)
LoadDLLfuncEx (GetConsoleWindow, 0, kernel32, 1)
LoadDLLfuncEx2 (IsDebuggerPresent, 0, kernel32, 1, 1)
LoadDLLfuncEx (Process32First, 8, kernel32, 1)
LoadDLLfuncEx (Process32Next, 8, kernel32, 1)

View File

@ -888,8 +888,6 @@ class fhandler_tty_slave: public fhandler_tty_common
__off64_t lseek (__off64_t, int) { return 0; }
select_record *select_read (select_record *s);
int ready_for_read (int fd, DWORD howlong);
int cygserver_attach_tty (HANDLE*, HANDLE*);
};

View File

@ -412,6 +412,7 @@ process_ioctl (void *)
fhandler_tty_slave::fhandler_tty_slave (int num)
: fhandler_tty_common (FH_TTYS, num)
{
set_r_no_interrupt (1);
}
fhandler_tty_slave::fhandler_tty_slave ()
@ -666,12 +667,11 @@ fhandler_tty_slave::read (void *ptr, size_t len)
if (vmin > INP_BUFFER_SIZE)
vmin = INP_BUFFER_SIZE;
vtime = get_ttyp ()->ti.c_cc[VTIME];
if (vmin < 0) vmin = 0;
if (vtime < 0) vtime = 0;
if (vmin == 0)
time_to_wait = INFINITE;
else
time_to_wait = (vtime == 0 ? INFINITE : 100 * vtime);
if (vmin < 0)
vmin = 0;
if (vtime < 0)
vtime = 0;
time_to_wait = vtime == 0 ? INFINITE : 100 * vtime;
}
else
time_to_wait = INFINITE;
@ -910,8 +910,8 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
{
termios_printf ("ioctl (%x)", cmd);
if (myself->pgid && get_ttyp ()->getpgid () != myself->pgid &&
myself->ctty == ttynum && (get_ttyp ()->ti.c_lflag & TOSTOP))
if (myself->pgid && get_ttyp ()->getpgid () != myself->pgid
&& myself->ctty == ttynum && (get_ttyp ()->ti.c_lflag & TOSTOP))
{
/* background process */
termios_printf ("bg ioctl pgid %d, tpgid %d, ctty %d",

View File

@ -787,40 +787,6 @@ fhandler_tty_slave::select_read (select_record *s)
return s;
}
int
fhandler_tty_slave::ready_for_read (int fd, DWORD howlong)
{
HANDLE w4[2];
if (cygheap->fdtab.not_open (fd))
{
set_sig_errno (EBADF);
return 0;
}
if (get_readahead_valid ())
{
select_printf ("readahead");
return 1;
}
w4[0] = signal_arrived;
w4[1] = input_available_event;
switch (WaitForMultipleObjects (2, w4, FALSE, howlong))
{
case WAIT_OBJECT_0:
set_sig_errno (EINTR);
return 0;
case WAIT_OBJECT_0 + 1:
return 1;
case WAIT_FAILED:
select_printf ("wait failed %E");
set_sig_errno (EINVAL); /* FIXME: correct errno? */
return 0;
default:
if (!howlong)
set_sig_errno (EAGAIN);
return 0;
}
}
select_record *
fhandler_dev_null::select_read (select_record *s)
{