non blocking scanf or read

I need to write a non-blocking i/o program that uses getchar() and then
writes that character over a serial port. I have tried select() and it
didn’t really work. Do any other option exist.

kweisser@udel.edu
Kevin Weisser

Kevin Weisser <kweisser@udel.edu> wrote:

I need to write a non-blocking i/o program that uses getchar() and then
writes that character over a serial port. I have tried select() and it
didn’t really work. Do any other option exist.

fd = open(“whatever”, O_NONBLOCK|O_READ));
read( fd, buff, 1 );

How did select() not work? What/who owned the fd you were selecting()
on?

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.