[comp.unix.questions] reading from rs232 tty in ULTRIX

rhb@bu-pub.bu.edu (Rick Broberg) (01/23/91)

I'm trying to read from a /dev/tty in ultrix which is the external
serial port on the machine.  I can open it, ioctl it for proper 
speed and data format configuration, even write to it just fine.
When I read from it, read *never* blocks, and multiple reads return
the same thing over and over, including some random junk.  Read doesn't
return -1 or 0, just random numbers.

Do I need to write a device driver for this?  If so, how?  Can I escape
having to?  If I must, why is it that the output to the port does work
but not the input.