[net.unix-wizards] pty driver question

mark (07/20/82)

Could someone who is familiar with the pty driver answer a question for me?

I tried installing some ptys on my 4.1BSD system, and then used them by putting
a getty on ttya and doing 'cu ttya'.  It works fine for a minute or two,
allowing me to get logged onto the pty and type a few commands.  Then, suddenly
cu thinks it lost the line.  Turns out one of the reads on the controller end
returned a -1, with errno set to ENXIO.  ("No such device or address.")  I
couldn't see anything in the driver that could generate this.  I changed cu
to ignore the error condition and it seemed to work OK.

What would cause a pty controller device to return a read error?  What is
the standard technique for programming around this - just ignore the error?
This seems dangerous - perhaps only ENXIO's should be ignored.  Anyone know
what possible errors there might be?

Reply to mark@Berkeley on the arpanet.  Thanks much.