1 Jun 2012 08:21
Re: programming with pty(4)
Brook Milligan <brook <at> nmsu.edu>
2012-06-01 06:21:26 GMT
2012-06-01 06:21:26 GMT
On Thu, 31 May 2012 21:45:47 +0000 (UTC) christos <at> astron.com (Christos Zoulas) wrote: > In article <20120531120352.4c293fba <at> viola.nmsu.edu>, > Brook Milligan <brook <at> nmsu.edu> 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
RSS Feed