Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-11-09 05:03:33 +0300
committerChristopher Faylor <me@cgf.cx>2000-11-09 05:03:33 +0300
commitc5d03f3dcae1ac6203e6323714fde3fe4bca3f0b (patch)
tree11c3fc6864df5a811fb0e3be61fcf4b47df4e26d /winsup
parent4c35f9f01f9f9656f80291701a8edbe4c7e13668 (diff)
* select.cc (peek_pipe): Deal with pending newline in pty_master.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/select.cc21
2 files changed, 20 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7b7843f93..90424c834 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Wed Nov 8 21:00:31 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * select.cc (peek_pipe): Deal with pending newline in pty_master.
+
Wed Nov 8 15:35:32 2000 Christopher Faylor <cgf@cygnus.com>
* environ.cc (_addenv): malloc space for setenv if cygwin1.dll is used
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index bcaf4a467..83312714b 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -418,12 +418,23 @@ peek_pipe (select_record *s, int ignra)
goto out;
}
- if (!ignra && fh->get_device () != FH_PTYM && fh->get_device () != FH_TTYM &&
- fh->get_readahead_valid ())
+ switch (fh->get_device ())
{
- select_printf ("readahead");
- gotone = s->read_ready = 1;
- goto out;
+ case FH_PTYM:
+ case FH_TTYM:
+ if (((fhandler_pty_master *)fh)->need_nl)
+ {
+ gotone = s->read_ready = 1;
+ goto out;
+ }
+ break;
+ default:
+ if (!ignra && fh->get_readahead_valid ())
+ {
+ select_printf ("readahead");
+ gotone = s->read_ready = 1;
+ goto out;
+ }
}
}