[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference share::zap

Title:Zap Technical Conference
Notice:ZAP Version 5.3 is available. See note 1.1
Moderator:ZAPDEV::MACONI
Created:Mon Feb 24 1986
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:170
Total number of notes:492

17.0. "WHO repeats output V2.1" by OVDVAX::MARTIN () Fri Jun 13 1986 17:39

    When I run WHO from a non-privileged account I get a long stream of
    repeated lines.  Is this normal? Note in the sample below I am logged
    in twice but why so many repeats?  If I enable privileges I get
    the normal WHO listing of all the jobs.
    
    Any info?
    
    /Christopher/
    
    [Who: System process summary at 13-JUN-1986 13:31:46.13, Version 2.1]
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT742:  MARTIN       00000F17 DBA0:[SYS0.SYSCOMMON.][SYSEXE]WHO.EXE;1
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
    LT746:  MARTIN       000002A5 
T.RTitleUserPersonal
Name
DateLines
17.1Another bugMRMFG3::K_MACONIThe DoctorMon Jun 16 1986 13:104
    I have not acutally spent the time to research why a non-privileged
    account gets duplicate entries when they execute the WHO utility.
    The solution is to either put a privilege check for WORLD or GROUP,
    or to add the overhead of removing duplicate entries.
17.2Check status returnSIBYL::POOREStuart PooreFri Jun 20 1986 14:0910
    When I wrote a ZAP like utility (I'm the guy mentioned by
    SIBYL::PATTENDEN in the 'where installed' note), I found that if
    I didn't check the status after a call to GET$JPI (or what ever
    I used), and blindly carried on as if all was O.K. I read back the
    contents of the last successful GET$JPI. Since I only had privilege
    to look at my self, I got a long list of repitions of my own entry.
    This is whats happening above. Simular problem, simular reason ?
    
    	Hope this help,
    		Stuart P.
17.3Status not checkedMRMFG3::K_MACONIThe DoctorMon Jun 23 1986 13:516
    That sounds like the reason that the above problem was occuring
    in pre-V2.2 versions of WHO, as the status is not checked after
    a call to SYS$GETJPI.
    
    The fix that was applied in V2.2 of WHO was to just remove duplicate
    entries when all of the entries are sorted.
17.4why not check?PIXEL::BRIANBrian Simons - DPS / GraphicsMon Jan 05 1987 13:5711
>    That sounds like the reason that the above problem was occuring
>    in pre-V2.2 versions of WHO, as the status is not checked after
>    a call to SYS$GETJPI.
>    
>    The fix that was applied in V2.2 of WHO was to just remove duplicate
>    entries when all of the entries are sorted.

Wouldn't it be easier and cleaner to check the status after each SYS$GETJPI?
Or exit the loop if (this_pid == last_pid)?

bs
17.5WHO not optimizedMRMFG3::K_MACONIThe DoctorWed Jan 07 1987 13:5518
    The method used to scan the system for the pids is simplistically
    documented under: HELP LEXICAL F$PID Example
    
    A context variable is used to sequentially scan the system until
    the last process is found.  Unfortunately, when a privilege violation
    occurs, due to how it is implemented in WHO, the owners process
    is scanned.  This means that if you have no privileges, you should
    find your own process repeated as many times as there are processes
    on the system.
    
    Since WHO is merely a cut-and-paste of ZAP, it is not a priority
    to optimize it, since it only scans the system once and then exits.
    Normally, WHO is installed on the system with WORLD privilege and
    therefore this problem does not normally occur.  Mainly, the fix
    was implemented for users who want to use WHO with only GROUP
    privilege.
    
    				Keith Maconi