From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,c7be9585a4949490 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-05-07 18:29:09 PST Newsgroups: comp.sys.dec Path: gmd.de!ira.uka.de!howland.reston.ans.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!saifr00.cfsat.honeywell.com!tomas@saifr00.cfsat.honeywell.com From: tomas@swtech24.engnis (Roger Tomas) Subject: Re: Vax/VMX question Message-ID: <1993May7.210830.13133@saifr00.cfsat.honeywell.com> Sender: news@saifr00.cfsat.honeywell.com Nntp-Posting-Host: swtech24 Reply-To: tomas@saifr00.cfsat.honeywell.com Organization: Honeywell, Inc. References: <7117@npri6.npri.com> Date: Fri, 7 May 93 21:08:30 GMT In article 7117@npri6.npri.com, murphy@npri6.npri.com (David P. Murphy) writes: >TRUNTZ@UHAVAX.HARTFORD.EDU (TRUNTZ, ERIC) writes: > >>Everyone, >> and the location of the user is reasonable simple. My problem arises >> in determining which imagename to select for a user. Suppose a user >> has logged in and his process name is USER then he spawns a subprocess >> called USER_1 he now has two processes on the system. At this stage >> all keystrokes that the user makes will end up affecting the process >> named USER_1. This is what I mean when I say a termianl is communicating >> with a process. Suppose the usaer types ATTACH USER, Now keystrokes >> get "sent" to the process call USER. My question is how can I determine >> which process a terminal is communicating with. > >assuming that you really have made it this far, the first test you can make >is choose the process which does *not* have a JPI$_STATE equal to SCH$C_HIB >or SCH$C_HIBO. > >in other words, the process which is not attached will be hibernating. >of course, the active process may very well be hibernating on its own accord, >but that's the best i can do for now. Not necessarily. Have you ever used the SPAWN/NOWAIT command? This creates a subprocess that shares the terminal with the parent process. I believe input (and output) alternates between the parent process and the subprocess based on the order read requests are queued to the I/O channel associated with the terminal. In this case, neither process enters the hibernate state. Roger Tomas tomas@saifr00.cfsat.honeywell.com