From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,26b6aefdc371738a X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,26b6aefdc371738a X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,26b6aefdc371738a X-Google-Attributes: gidfee84,public From: ken@halcyon.com (Ken Pizzini) Subject: Re: enumerating processes: DEC OSF/1 Date: 1999/02/20 Message-ID: #1/1 X-Deja-AN: 446288670 References: <7a974k$u8r$1@news.alphalink.com.au> Organization: _ User-Agent: slrn/0.9.5.3 (UNIX) Reply-To: ken@halcyon.com Newsgroups: comp.unix.osf.osf1,comp.unix.osf.osf1,comp.unix.programmer,comp.unix.questions On Mon, 15 Feb 1999 13:08:42 +1100, Greg Robson-Garth wrote: >Is there a way of enumerating (listing) current running processes in DEC >UNIX from a C program? > >I currently call the the 'table' C function but it requires superuser (root) >permissions. Are there any functions which can do this without needing >superuser access ? Well, there's always the old standby of: popen("ps", "r") (Many *nix systems with a /proc filesystem offer "cleaner" solutions without superuser priveleges, but traditionally one had to rummage around in the kernel's memory space in order to read the process tables so that one can extract this information, and that clearly is a root-only proposition.) --Ken Pizzini