How to make 4.2bsd processes STOP instead of die on SIGXCPU?

idallen at watmath.UUCP idallen at watmath.UUCP
Fri Oct 12 04:08:21 AEST 1984


For CPU limits to be truly useful, processes must STOP, not die, when
they exceed their limits.  Once stopped, a mechanism for increasing
the allowed CPU must be provided.  Rather than changing all the existing
code to incorporate the proper signal handler, can one change the
kernel to STOP runaway processes, and also provide a program to let users
increase the CPU allowed to a STOPped process?  (If renice(8) can alter
process priority, surely a similar mechanism can alter allowed CPU.)
Having this facility would let us set a reasonable CPU limit on our
student machine (to catch runaways) without having editors and other
processes that really need the CPU die out (they would STOP, not die,
and could be restarted with a bigger CPU limit).

I am aware that setting a default SIGXCPU signal handler in crt0 in the
C Library would allow new programs to STOP when they exceed their
limit, but the mechanism for increasing the limit for a STOPped process
is missing (short of arbitrarily increasing the limit by some magic
amount), and programs that don't use the library don't benefit.

A similar way of treating SIGXFSZ should also be invented.
-- 
        -IAN!  (Ian! D. Allen)      University of Waterloo



More information about the Comp.unix.wizards mailing list