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".

ps also doesn't really have a way of displaying multiple values for
a process in any sensible fashion.  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.

> 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?

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

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

 - Craig
-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/                             csmall at : enc.com.au
http://www.debian.org/          Debian GNU/Linux, software should be Free 



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

Reply via email to