On Friday 21 November 2008 09:10, Craig Small <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 20, 2008 at 10:01:53PM +1100, Russell Coker wrote:
> > The supplementary groups (see setgroups(2) and getgroups(2)) for a
> > process can be accessed by "grep ^Groups /proc/PID/status", but it seems
> > impossible to display this from ps.
>
> I don't think it is ps's place to do so.  ps doesn't usually do much of
> "find me a process that in its list has..", it is generally a 1:1
> relationship "find me a process with UID x".

It's the place of PS to report all the relevant information about a process.

> ps also doesn't really have a way of displaying multiple values for
> a process in any sensible fashion.

The command-line of a process has multiple values.

> I really don't think it fits well 
> within ps. At a stretch it might be a select option but it doesn't work
> well with a display option.

What program do you think it fits better?

> > Currently if you have a process with a supplementary GID of 0 then
> > grepping /proc seems to be the only way to discover this fact.
>
> So, its more you are looking for something that finds any process that
> has a supplementary GID of, say, 0?

No, I want to know what the supplementary groups of a process are.

> To me that would me more like what pgrep/pkill should be doing. Would
> that make more sense?

Except when I don't want to kill it.

> ie pgrep --some-flag <supplementary-gid> would should all pids of
> processes that have that supplementary gid.

Except for the case where I don't know what supplementary GID the process in 
question might have.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to