NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

programming with pty(4)



I have a program that opens a pty(4) on a NetBSD box and reads/writes on
the master side.  I can connect to the slave side with tip(1) and
communicate perfectly with the master side of the pty(4).  However, if
I disconnect tip(1) with ~^D and try to reconnect, tip(1) reports a
'Device busy' error.  Presumably, I need to detect the fact that tip(1)
disconnected and do something to the pty(4) device in order to allow a
later connection, but I'm not sure (i) how to detect the disconnection
and (ii) what to do when it happens.

Any help with programming pty(4) devices is greatly appreciated.

Thanks a lot.

Cheers,
Brook


Home | Main Index | Thread Index | Old Index