[comp.unix.questions] CPU time limit on an entire process group?

bernhold@qtp.ufl.edu (David E. Bernholdt) (11/18/89)

I want to be able to enforce CPU time limits on a process group as a
whole:  send every process in the group a signal when the CPU time
accumulated by all of the processes exceedes some limit.

I tried setrlimit, but that give only a per-process limit.  Searching
through the man pages, I can't even find a way of getting the actual
usage of an entire process group -- everything I can find reports only
terminated processes.

The only thing I can think of would be to actually work through the
whole group in the process table and add everything up.  Is this the
thing to do?

If anyone has a code which would do this (or pieces of it) I would
like to look at it.

I'm running SunOS 4.0.1.

Thanks.
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365