Subject: Re: serial ports
To: None <collver@softhome.net>
From: Brian Stark <bstark@siemens-psc.com>
List: netbsd-help
Date: 12/28/2000 10:27:48
On Thu, 28 Dec 2000 collver@softhome.net wrote:

> I noticed though that open("/dev/ttyXX", O_RDWR|O_NONBLOCK); made read()
> read nothing where open("/dev/dtyXX", O_RDWR); made read() read data.  Do
> you have an idea why?


I think that when O_NONBLOCK is set if there is no data to be read, read()
will return a -1 and set the value of errno to EAGAIN. This allows an
application to continue on with other tasks and can try to read again
later.

Brian

-------------------------------------------------------------------------
| Brian Stark  Siemens Power Transmission & Distribution, Inc.          |
|              Energy Management and Information Systems Division       |
|              7225 Northland Drive, Brooklyn Park, Minnesota 55428 USA |
| email: bstark@siemens-psc.com +1 763 536-4697 fax: +1 763 536-4919    |
-------------------------------------------------------------------------