Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!wuarchive!decwrl!shelby!rutgers!cbmvax!ag From: ag@cbmvax.commodore.com (Keith Gabryelski) Newsgroups: comp.unix.internals Subject: Re: Watch, Spy, whatever you wanna call it Message-ID: <15139@cbmvax.commodore.com> Date: 13 Oct 90 03:40:32 GMT References: <29835@netnews.upenn.edu> <1990Oct2.022530.15042@celebr.uucp> Reply-To: ag@cbmvax.commodore.com (Keith Gabryelski) Distribution: na Organization: Commodore-Amiga Unix; West Chester, PA Lines: 36 In article <1990Oct2.022530.15042@celebr.uucp> jbm@celebr.uucp (John B. Milton) writes: >In article <29835@netnews.upenn.edu> kehoe@scotty.dccs.upenn.edu (Brendan Kehoe) writes: >[stuff about VMS WATCH] >> Well, anyway, what's the deal? Has one ever been written for under >>Unix? (With the plethora of hackers [old definition, not vernacular] >>that have and are in the Unix world today, I'd be really surprised >>if it hadn't.) Ok, let's say it hasn't. Then how about what it'd >>take to write one? I can think of a little theory (sharing their >>device buffers, etc etc) but I can see that I'd probably know more >>internals (how oddly appropriate) than I would ever want to if I >>were to sit down and do this (preferably not alone). But that may >>not be that bad. Whatcha think? > >Hmm. As far as I know, this has not been done for UNIX. This was >available under TOPS/20, I think it was called ADVISE. I, infact, wrote one last weekend. I will be posting it to alt.sources in a few days. In works under System V Release 4 STREAMS (and can be ported to earlier streams versions). >I would think that the appropriate way to implement it would be with >a STREAMS module. The monitor program would open the tty device of >the person to be monitored/assisted. The monitor would then push a >monitor module onto the device and communicate with the module >through ioctl() calls. One problem is that the tty (pty, sxt) device >would have to be a STREAMS device. The monitor program could put the >input/output through the tty in a window, look into the envp of the >process to get the TERM variable (or dynamically figure out the term >type), blah blah. The rest is just window dressing. Adapting to stty >modes and such could be partially done by the monitor module. Except for the TERM sillyness my advise programs does just this. Pax, Keith