This is the mail archive of the
mailing list for the Cygwin project.
Request for help debugging screen problem
- From: Shaddy Baddah <helium at shaddybaddah dot name>
- To: cygwin-developers at cygwin dot com
- Date: Fri, 05 Feb 2010 10:42:09 +0000
- Subject: Request for help debugging screen problem
I'm trying to debug a problem with screen, rather than publish a bug
report. I can do that as well if someone requests it, no problem.
The issue I'm facing is with a read on the Windows named pipe associated
with a tty device. I note that in this bit of code:
224: transport_layer_pipes::read (void *const buf, const size_t len)
226: // verbose: debug_printf ("reading from pipe %p", _hPipe);
228: assert (_hPipe);
229: assert (_hPipe != INVALID_HANDLE_VALUE);
230: assert (!_is_listening_endpoint);
232: DWORD count;
233: if (!ReadFile (_hPipe, buf, len, &count, NULL))
235: debug_printf ("error reading from pipe (%lu)", GetLastError ());
236: SET_ERRNO (EINVAL); // FIXME?
237: return -1;
240: return count;
before and after the ReadFile the error code can return a different
value. ie. a call to the following function, returns different values:
ssize_t client_request::error_code() const;
I'm curious as to how this could be. Is there some callback function
registered via the Windows API that ReadFile calls at various points in
its execution? Or is another thread setting this value?
Any help would be greatly appreciated.
Thanks in advance,