summaryrefslogtreecommitdiff
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index b073c940cad..68a09a2a7c8 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -411,11 +411,13 @@ 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 ()
: fhandler_tty_common (FH_TTYS, 0)
{
+ set_r_no_interrupt (1);
}
/* FIXME: This function needs to close handles when it has
@@ -651,12 +653,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;
@@ -895,8 +896,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",