* 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.
This commit is contained in:
parent
a7a1247770
commit
be9b5aba26
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue