Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Vax/VMX question
@ 1993-05-04 18:32 TRUNTZ, ERIC
  1993-05-05 14:45 ` David P. Murphy
  0 siblings, 1 reply; 3+ messages in thread
From: TRUNTZ, ERIC @ 1993-05-04 18:32 UTC (permalink / raw)


Everyone,
        Either Ive been doing something wrong, Ive lost my mind or both...
   I have asked this question on this list several times. I have never
   posted directly to the news group. I recieve posts from the list but
   I cannot get help from the server nor do my posts make it to the list..
        I do however still have a question Ive been wrestling with. It
   concerns the communication of a terminal to a process... I'm working on
   an application that will display the interactive usernames of each user
   on a specific node in our cluster. It determines the user's physical
   location as well as the name of the image they are currently running.
   We use this software to manage our labs so that we can keep track of
   available terminals in certain labs and so on... Getting the username
   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. the JPI$TERMINAL and
   JPI$PHYDEVNAM work fine so long as the process in question is not a
   subprocess. If it is these call get me nowhere. VMS must know which
   process to talkto however. Id like to know how it knows or rather how
   I can find out if a process is currently communicating with a terminal
   or if its just out in the "background" please pardon the Unix term :)
        If anyone has any clues please post to this news group. I cannot trust
   that I will recieve mail at this point. (Trying to satraighten things out)
   Thanks in advance........

                                        Sysop3%uhavax.dnet@ipgate.hartford.edu
                                        eric.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Vax/VMX question
  1993-05-04 18:32 Vax/VMX question TRUNTZ, ERIC
@ 1993-05-05 14:45 ` David P. Murphy
  1993-05-07 21:08   ` Roger Tomas
  0 siblings, 1 reply; 3+ messages in thread
From: David P. Murphy @ 1993-05-05 14:45 UTC (permalink / raw)


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.

ok
dpm
-- 
murphy@npri6.npri.com (systems programmer at large)       When every one is dead
602 Cameron St.                                       the Great Game is finished
Alexandria, VA 22314                                                 Not before.
(703) 683-9090                                            --- Hurree Babu, "Kim"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Vax/VMX question
  1993-05-05 14:45 ` David P. Murphy
@ 1993-05-07 21:08   ` Roger Tomas
  0 siblings, 0 replies; 3+ messages in thread
From: Roger Tomas @ 1993-05-07 21:08 UTC (permalink / raw)



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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1993-05-07 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-05-04 18:32 Vax/VMX question TRUNTZ, ERIC
1993-05-05 14:45 ` David P. Murphy
1993-05-07 21:08   ` Roger Tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox