* 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.
+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>
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)
__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*);
};
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 ()
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;
{
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",
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)
{