Inhibiting core dumps

James Helman jim at baroque.Stanford.EDU
Fri Apr 13 07:20:23 AEST 1990


Every time I log out from 4Sight, the X server dumps core leaving a
large file in /.  The fact that X dumps core, doesn't bother me in
this situation.  I'm already out the door.  But I frequently have
people complain about compile problems because of inadequate space in
/tmp.

My kludge of a solution was to change inetd.conf so that inetd invokes
a Bourne shell script which does a "ulimit 10" before starting Xsgi.
Doing a cd to a read only filesystem like /debug also works quite
effectively.  I now get nice little 1164 byte core dumps.  (I expected
to get 5120.  There must be something magic about 1164, like maybe
it's some header length).

I wish the C shell implemented the various "limit" commands.  Using
these one can make much more focused restrictions, e.g.  "limit
coredumpsize."  Ulimit is quite crude and works in this case only
because (I hope) the X server never writes to disk except when dumping
core.

Questions:

	1) Does the X server ever need to write any files?  If so,
	this solution could cause problems.

	2) I don't find any system call analogous to BSD's
	setrlimit().  Is ulimit all the kernel supports?  Is there
	any way to only inhibit core dumps?

Jim Helman
Department of Applied Physics			6 Trillium Lane
Stanford University				San Carlos, CA 94070
(jim at thrush.stanford.edu) 			(415) 723-9127



More information about the Comp.sys.sgi mailing list