NetBSD-Users archive

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

Re: programming with pty(4)



On Thu, 31 May 2012 21:45:47 +0000 (UTC)
christos%astron.com@localhost (Christos Zoulas) wrote:

> In article <20120531120352.4c293fba%viola.nmsu.edu@localhost>,
> Brook Milligan  <brook%nmsu.edu@localhost> wrote:
> >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.
> 
> Are you using BSD pty's or PTYFS?

BSD pty(4).

Cheers,
Brook


Home | Main Index | Thread Index | Old Index