delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
To: | cygwin AT cygwin DOT com |
From: | Jason Curl <j DOT m DOT curl AT optusnet DOT com DOT au> |
Subject: | Re: select() read() and write() on /dev/console |
Date: | Mon, 22 Nov 2004 14:53:20 +0000 (UTC) |
Lines: | 50 |
Message-ID: | <loom.20041122T151333-846@post.gmane.org> |
References: | <Pine DOT LNX DOT 4 DOT 44 DOT 0411191834400 DOT 1687-100000 AT centurai DOT sps DOT mot DOT com> <20041119183842 DOT GB26102 AT trixie DOT casa DOT cgf DOT cx> |
Mime-Version: | 1.0 |
X-Complaints-To: | usenet AT sea DOT gmane DOT org |
X-Gmane-NNTP-Posting-Host: | main.gmane.org |
User-Agent: | Loom/3.14 (http://gmane.org/) |
X-Loom-IP: | 62.180.53.220 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0) |
X-IsSubscribed: | yes |
Christopher Faylor <cgf-no-personal-reply-please <at> cygwin.com> writes: > > On Fri, Nov 19, 2004 at 06:46:56PM +0100, Jason Curl wrote: > >My question, how do I go about investigating what the root cause is? Has > >anybody else seen similar issues and been able to work around it? I'm > >stuck and I've never seen the source code to cygwin before. > > If you suspect a problem with the cygwin DLL then you can build a > debugging version of the cygwin DLL and debug it using gdb. > > Most of the console handling is in fhandler_console.cc. The select > handling is in select.cc. Look for the string "console" there. > > Instructions for building the DLL are in the FAQ: > > http://cygwin.com/faq/faq_3.html#SEC101 > > Hello, In the function select.cc (v1.102.2.2): peek_console() there is a reference to the function fh->get_readahead_valid(). I don't see how 'fh' is assigned. What I've figured out so far is select_stuff::test_and_set builds up the linked list 'start.next'. fhandler_console::select_read initialises one of those entries in that linked list. But neither of these functions set s->fh to anything (so it defaults to NULL). Other two entries are writing to the console and reading from the serial port. btw, I don't know why is there in select_stuff::test_and_set the line if (s->window_handle || s->window_handle || s->window_handle) Then I look at fhandler.h and find get_readahead_valid() and from here I don't know what's going on. Could the comment at line 85 of fhandler.cc (inside fhandler_base::get_readahead) have anything to do with the problem I am having? So far I don't think so because the bit is being set by the return value of peek_console. It appears at least looking at the strace logs for the function peek_console() fh->get_readahead_valid() is returning 0. me->read_ready == 0 as expected also. The final result is that peek_console is returning a non-zero value. I'm going to start looking into the 'read' code now and see if I can figure out what the leadup to a value of -1 errno=11 could be. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |