Messages in this thread | | | Date | Tue, 10 Dec 1996 02:44:52 -0500 (EST) | From | Gerry S Hayes <> | Subject | Re: memory crash |
| |
William Burrow <aa126@fan.nb.ca> writes: > > I have some questions: > > 1. Is it possible to set limits on accounts so that > > a. this kind of thing cannot be done ? > > Under certain circumstances, the shell gets swapped out to make space for > the offending program, and cannot be swapped back to enforce ulimits. So > ulimits won't work. (This is the case on my machine, when I thought I > would be so smart to setup the ulimits fairly conservatively)
So use lshell, which does the setrlimit() and exits, leaving the kernel to deal with things. This should work. The code in kernel/sched.c seems to properly terminate a process which has exceeded its CPU limit. The code in mm/mmap.c and mm/mremap.c seem to properly enforce memory limits. If you think there is a kernel bug, post some code that can exceed its resource limits. If you don't think there is a kernel bug, move to comp.os.linux.setup or someplace else non-kernel-related.
man 2 setrlimit for more info.
lshell is in ftp://sunsite.unc.edu/pub/Linux/system/Admin/login/.
Cordially,
Sumner
| |