Device Emulation with a pty?

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Mon Oct 8 13:29:07 AEST 1990


In article <6372 at emory.mathcs.emory.edu> km at mathcs.emory.edu (Ken Mandelberg) writes:
> I would like to use a pty to let a process emulate a device.  However,
> it looks to me like the pty interface doesn't really provide enough
> control and status on the master side.

A pty only acts like a device over the lifetime of one session. It isn't
meant to survive past hangup. (Though you can set the tty speed to 0 to
simulate a hangup on some systems.)

What are you really trying to do?

>  * detect device specific slave side ioctls and reply to them from
>    the master side.

Look up TIOCPKT and TIOCREMOTE.

---Dan



More information about the Comp.unix.internals mailing list