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>2011-06-01 05:20:28 +0400
committerChristopher Faylor <me@cgf.cx>2011-06-01 05:20:28 +0400
commitbe9b5aba2693adef4a1018d695baa6cb32afd441 (patch)
tree6ebc6c0e1a40d2fc0712193a9d925222feec8837 /winsup
parenta7a1247770dd53b8bced15e06d9b6af19a1790fe (diff)
* external.cc (fillout_pinfo): Don't truncate ctty if it's < 0.
* select.cc (pipe_data_available): Avoid printing debug info by default or suffer very large strace files.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/external.cc2
-rw-r--r--winsup/cygwin/select.cc4
3 files changed, 10 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d766b169b..329047f0c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2011-05-31 Christopher Faylor <me.cygwin2011@cgf.cx>
+ * external.cc (fillout_pinfo): Don't truncate ctty if it's < 0.
+
+ * select.cc (pipe_data_available): Avoid printing debug info by default
+ or suffer very large strace files.
+
+2011-05-31 Christopher Faylor <me.cygwin2011@cgf.cx>
+
* select.cc (pipe_data_available): New function - uses
NtQueryInformationFile to return information about pipes.
(peek_pipe): Rewrite to use pipe_data_available for both read and write
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index e7cb40ba4..d818cbc78 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -76,7 +76,7 @@ fillout_pinfo (pid_t pid, int winpid)
}
else if (nextpid || p->pid == pid || (winpid && thispid == (DWORD) pid))
{
- ep.ctty = iscons_dev (p->ctty) ? p->ctty : device::minor (p->ctty);
+ ep.ctty = (p->ctty < 0 || iscons_dev (p->ctty)) ? p->ctty : device::minor (p->ctty);
ep.pid = p->pid;
ep.ppid = p->ppid;
ep.dwProcessId = p->dwProcessId;
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 14953a23a..7197ed117 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -497,7 +497,7 @@ pipe_data_available (int fd, fhandler_base *fh, HANDLE h, bool writing)
else if (!writing)
{
res = !!fpli.ReadDataAvailable;
- select_printf ("fd %d, %s, read avail %u", fd, fh->get_name (), fpli.ReadDataAvailable);
+ paranoid_printf ("fd %d, %s, read avail %u", fd, fh->get_name (), fpli.ReadDataAvailable);
}
else
{
@@ -507,7 +507,7 @@ pipe_data_available (int fd, fhandler_base *fh, HANDLE h, bool writing)
buffer but that is the hazard of select(). */
if ((fpli.WriteQuotaAvailable = (fpli.OutboundQuota - fpli.ReadDataAvailable)))
{
- select_printf ("fd %d, %s, write: size %lu, avail %lu", fd,
+ paranoid_printf ("fd %d, %s, write: size %lu, avail %lu", fd,
fh->get_name (), fpli.OutboundQuota,
fpli.WriteQuotaAvailable);
res = true;