Re: setrlimit() extension suggestion



David Schwartz wrote:
> [...]
I don't know. What's the actual problem? I understand that limiting
the wall clock time is your proposed solution, but solution TO WHAT?
Why don't you want it to run more than 15 seconds? (The solution to
your problem as stated is probably to write a trivial 'container'
program that launches a program in a new process group and kills that
process group in 15 seconds. But that might be the wrong solution to
your actual problem. I don't know.)

How about: "There is an all-campus computer for the students to
run their email and compile and run simple c++ programs. This is
a small server machine, but there are hundreds of students using
it. Some students test their MPI programs, when these deadlock,
they leave tens of sleeping processes each. They do not utilize
the CPU, but clutter outputs of 'top', 'ps' and the like with,
in time, thousands of processes nobody needs. It would be good
to automatically kill such deadlocked processes in, say, 4 hours
rather than waiting for the next reboot."

Admittedly, one could do that with a simple script.

- J.
.