Blocking supported by Serial Device Driver?

Does the Serial Device Driver support blocking a “read” when there is no data
available on the serial port? If it does is this the default or does it have to
be
set using an ioctl or fcntl command?


Glenn Davidson || Phone: (902)492-4780
Satlantic Inc., Richmond Terminal, Pier 9 |
| Fax: (902)492-4781
3295 Barrington St., Halifax, NS, Canada |*| E-mail: glenn@satlantic.com

It’s the default. If you want unblock you can call open() with the
O_NONBLOCK flag.

“Glenn Davidson” <glenn@satlantic.com> wrote in message
news:3AB231D1.A3145E70@satlantic.com

Does the Serial Device Driver support blocking a “read” when there is no
data
available on the serial port? If it does is this the default or does it
have to
be
set using an ioctl or fcntl command?


Glenn Davidson || Phone: (902)492-4780
Satlantic Inc., Richmond Terminal, Pier 9 |
| Fax: (902)492-4781
3295 Barrington St., Halifax, NS, Canada |*| E-mail: > glenn@satlantic.com

Hello,

Glenn Davidson wrote:

Does the Serial Device Driver support blocking a “read” when there is no data
available on the serial port? If it does is this the default or does it have to
be set using an ioctl or fcntl command?

It depends on the open mode, VMIN, VTIME … please see:

http://www.linuxdoc.org/HOWTO/Serial-Programming-HOWTO.html

Armin