> Hopefully someone out there can help me. I need to find out the User Id of
> a process, given it's pid. I need some generic system call, which will work
> across a range of UNIX systems. I know I could use ps and grep the results,
> but I want to do this from C without using ps.
> Any help appreciated (even if telling me it's not possible)
> Roy Harrington
At least on HP-UX, there are wrapper routines for this such as
pstat_getproc, which returns process specific info, taking the pid as
one of the args. Even otherwise, I guess there must be some call which
can return process specific info. This will definitely contain UID as
one of the fields ( and a lot more other info if you wish ).
Srinivasan.