Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!lll-lcc!ptsfa!ihnp4!homxb!whuts!mtune!jhc From: jhc@mtune.ATT.COM (Jonathan Clark) Newsgroups: comp.unix.questions Subject: Re: tty watcher Message-ID: <1310@mtune.ATT.COM> Date: Tue, 22-Sep-87 02:00:53 EDT Article-I.D.: mtune.1310 Posted: Tue Sep 22 02:00:53 1987 Date-Received: Thu, 24-Sep-87 01:33:55 EDT References: <4263@ozdaltx.UUCP> <15136@hi.UUCP> <1178@mtune.ATT.COM> <1180@mtune.ATT.COM> <28020@sun.uucp> Reply-To: jhc@mtune.UUCP (Jonathan Clark) Organization: AT&T ISL Middletown NJ USA Lines: 40 >> /* output */ /* input */ >> mblk_t *dup; mblk_t *dup; >> dup = copymsg(mp); dup = copymsg(mp); >> putnext(up_to_monitor,dup); putnext(up_to_monitor,dup); >> putnext(down_to_device,mp); putnext(up_from_device,mp); > >this means that *everything* going up and down the stream gets sent upstream Well, the original requirement was that *everything* the user typed or was sent be seen on the monitoring terminal! >It's straightforward enough to duplicate only the interesting messages with >a switch statement, but it does increase the line count a bit more.... And I did mention that the 'guts' of the procedure could be done in three lines. Such trivialities as ensuring that the monitor tty is useable after unusual conditions are left as an exercise for the enthusiastic streams programmer :-) >I could imagine some packaged systems supplying a prebuilt kernel or kernels. I can imagine this as well although I understood that the SVR3 licence forbad this. I'm willing to be corrected by anyone who's actually seen one though. >Umm, no, it doesn't. I said "consist(s) *solely* of a user-mode program that >drops on top of a *non-hacked* UNIX system." You're right. I withdraw the comment. Although I personally believe that any streams modules *ought* to be user-level code, and that an experimental streams module shouldn't wreck the rest of the kernel when it falls over. Of course this would mean that you'd need more than two mutually protected address spaces. (Does this violate POSIX?) How about agreeing on 'come the revolution, this *will* be easy'? -- Jonathan Clark [NAC,attmail]!mtune!jhc The Englishman never enjoys himself except for some noble purpose.