This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: select on the parallel port, and non-blocking io


On Mon, Jul 16, 2001 at 05:27:36PM +0200, Kurt Roeckx wrote:
> I use select on 2 fds, one of which is the parallel port.
> 
> The parallel port was opened like this: 
> 
> 	port = open("lpt1", O_RDWR, O_NONBLOCK);
> 
> There shouldn't be any data on the port, since there is no device
> attached, or it's powered down (I tried both).  Yes select() says
> I can read from it, and blocks on it.

Oh, I forgot to mention something.  If I change lpt1 into com1,
things work perfect.  Select() doesn't say there is data to read,
and if I try to read from it, it returns -1, with errno set to
EAGAIN, as expected.


Kurt


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]