summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/fhandler_termios.cc40
-rw-r--r--winsup/cygwin/fhandler_tty.cc2
-rw-r--r--winsup/cygwin/sigproc.cc4
4 files changed, 30 insertions, 24 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7c99522cd..1de2f2649 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2012-11-08 Christopher Faylor <me.cygwin2012@cgf.cx>
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Don't do special
+ character handling when stopped by CTRL-S.
+ * fhandler_tty.cc (bytes_available): Add arguments to debug_only_printf
+ call.
+ * sigproc.cc (proc_subproc): Simplify some if logic.
+
2012-11-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/sys/termios.h (CBRK): Define as alias of CEOL.
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index 956786fae..611677868 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -239,26 +239,6 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
paranoid_printf ("char %0c", c);
- /* Check for special chars */
-
- if (c == '\r')
- {
- if (ti.c_iflag & IGNCR)
- continue;
- if (ti.c_iflag & ICRNL)
- {
- c = '\n';
- set_input_done (iscanon);
- }
- }
- else if (c == '\n')
- {
- if (ti.c_iflag & INLCR)
- c = '\r';
- else
- set_input_done (iscanon);
- }
-
if (ti.c_iflag & ISTRIP)
c &= 0x7f;
if (ti.c_lflag & ISIG)
@@ -298,11 +278,31 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
else if ((ti.c_iflag & IXANY) && tc ()->output_stopped)
goto restart_output;
}
+ /* Check for special chars */
+
+ if (c == '\r')
+ {
+ if (ti.c_iflag & IGNCR)
+ continue;
+ if (ti.c_iflag & ICRNL)
+ {
+ c = '\n';
+ set_input_done (iscanon);
+ }
+ }
+ else if (c == '\n')
+ {
+ if (ti.c_iflag & INLCR)
+ c = '\r';
+ else
+ set_input_done (iscanon);
+ }
if (iscanon && ti.c_lflag & IEXTEN && CCEQ (ti.c_cc[VDISCARD], c))
{
ti.c_lflag ^= FLUSHO;
continue;
}
+
if (!iscanon)
/* nothing */;
else if (CCEQ (ti.c_cc[VERASE], c))
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 6bb389f38..dcbe8097d 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -67,7 +67,7 @@ bytes_available (DWORD& n, HANDLE h)
termios_printf ("PeekNamedPipe(%p) failed, %E", h);
n = 0;
}
- debug_only_printf ("n %u, nleft %u, navail %u");
+ debug_only_printf ("n %u, nleft %u, navail %u", n, nleft, navail);
return succeeded;
}
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index d893fc2d8..091461476 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -247,9 +247,7 @@ proc_subproc (DWORD what, DWORD val)
case PROC_WAIT:
wval->ev = NULL; // Don't know event flag yet
- if (wval->pid == -1 || !wval->pid)
- child = NULL; // Not looking for a specific pid
- else if (!mychild (wval->pid))
+ if (wval->pid != -1 && wval->pid && !mychild (wval->pid))
goto out; // invalid pid. flag no such child
wval->status = 0; // Don't know status yet