Path: utzoo!utgpu!watmath!clyde!att!ucbvax!UB.D.UMN.EDU!tperala From: tperala@UB.D.UMN.EDU (Tim Perala) Newsgroups: comp.sys.encore Subject: inq_stats/real uid Message-ID: <8812021603.AA30695@ub.D.UMN.EDU> Date: 2 Dec 88 15:03:27 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 65 I am using the "inq_stats" call to find information on all processes that: 1) belong to a particular user, whether or not the process is running under a different uid or not. 2) have a common controlling terminal. In short, I am having trouble finding the real uid of a process. Here is the structure returned from a call to inq_stats when PROC_DETAIL is the type of info requested.... (I hope this is not an infringement of any type of copyright) struct proc_detail { char pd_state; /* State. */ char pd_pri; /* Priority, negative is high. */ char pd_initpri; /* Priority at process creation. */ char pd_basepri; /* Current base priority (initpri + "nice").*/ char pd_curpri; /* Current priority (basepri + scheduling */ /* factors. */ char pd_intr; /* If TRUE waiting at interruptable level. */ char pd_classid; /* Processor class bound to. */ char pd_cpuid; /* Processor currently executing on. */ char *pd_sem; /* Semaphore process is waiting for. */ struct timeval pd_utime; /* Time spent in user mode. */ struct timeval pd_stime; /* Time spent in system mode. */ struct timeval pd_starttime; /* Process creation time. */ double pd_virttime; /* Process virtual time. */ int pd_tsize; /* Size of text (clicks). */ int pd_dsize; /* Size of data space (clicks). */ int pd_ssize; /* Copy of stack size (clicks). */ int pd_rssize; /* Current resident set size in clicks. */ int pd_maxrss; /* Copy of u.u_limit[MAXRSS]. */ int pd_swrss; /* Resident set size before last swap. */ char pd_nice; /* Nice for cpu usage. */ int pd_maxrss; /* Copy of u.u_limit[MAXRSS]. */ int pd_swrss; /* Resident set size before last swap. */ char pd_nice; /* Nice for cpu usage. */ short pd_uid; /* User id, used to direct tty signals. */ u_int pd_pgrp; /* Name of process group leader. */ int pd_pid; /* Unique process id. */ int pd_ppid; /* Process id of parent. */ char pd_device[12]; /* Control terminal descriptor. */ int pd_size; /* Size of memory. */ int pd_flag; /* Flags. */ char pd_command[12]; /* The process command. */ int pd_sig; /* The current signal. */ int pd_sighold; /* The current mask of held signals. */ int pd_sigignore; /* The current mask of ignored signals. */ int pd_sigcatch; /* The current mask of caught signals. */ }; pd_uid is the effective uid (as far as I can tell). How do I find the real uid? Any Encore people listening? The documentation on this call leaves a lot to the imagination so to speak. Thanks for any help. Tim Perala System Software Programmer Information Services, University of MN, Duluth