[comp.unix.questions] Device Emulation with a pty?

km@mathcs.emory.edu (Ken Mandelberg) (10/06/90)

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. For example, I don't see how
to:

 * send a HUP to the slave side process by operating on the master
  (to emulate a device hangup)

 * cause the slave side process to block on open (for example to
   simulate waiting for DCD)

 * detect the slave side open not just its first write.

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

Can any of this been done on the existing BSD or Sun pty driver? Has
anyone done a more general pty streams module that does more of this.
-- 
Ken Mandelberg      | km@mathcs.emory.edu          PREFERRED
Emory University    | {rutgers,gatech}!emory!km    UUCP 
Dept of Math and CS | km@emory.bitnet              NON-DOMAIN BITNET  
Atlanta, GA 30322   | Phone: (404) 727-7963