* enumerating processes: DEC OSF/1
@ 1999-02-15 5:00 Greg Robson-Garth
1999-02-20 5:00 ` Ken Pizzini
0 siblings, 1 reply; 3+ messages in thread
From: Greg Robson-Garth @ 1999-02-15 5:00 UTC (permalink / raw)
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 ?
Greg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: enumerating processes: DEC OSF/1
1999-02-15 5:00 enumerating processes: DEC OSF/1 Greg Robson-Garth
@ 1999-02-20 5:00 ` Ken Pizzini
1999-03-08 5:00 ` Ron Feral
0 siblings, 1 reply; 3+ messages in thread
From: Ken Pizzini @ 1999-02-20 5:00 UTC (permalink / raw)
On Mon, 15 Feb 1999 13:08:42 +1100,
Greg Robson-Garth <gregr@alphalink.com.au> 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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: enumerating processes: DEC OSF/1
1999-02-20 5:00 ` Ken Pizzini
@ 1999-03-08 5:00 ` Ron Feral
0 siblings, 0 replies; 3+ messages in thread
From: Ron Feral @ 1999-03-08 5:00 UTC (permalink / raw)
The popen() solution is best. Without the /proc filesystem you'll have
to use table(). I assume that the version of Digital UNIX (OSF/1) you're
running doesn't have /proc. I remember V2.0 didn't.
Ken Pizzini <ken@halcyon.com> wrote in article
<slrn7cs2vt.8so.ken@pulsar.halcyon.com>...
> On Mon, 15 Feb 1999 13:08:42 +1100,
> Greg Robson-Garth <gregr@alphalink.com.au> wrote:
> >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")
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-03-08 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-02-15 5:00 enumerating processes: DEC OSF/1 Greg Robson-Garth
1999-02-20 5:00 ` Ken Pizzini
1999-03-08 5:00 ` Ron Feral
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox