How to stop core files in /

karish at mindcrf.UUCP karish at mindcrf.UUCP
Sun Jun 10 15:32:34 AEST 1990


In article <IaQKjXq00VRUI0xVYB at andrew.cmu.edu> mikem+ at andrew.cmu.edu
(Michael Meyer) writes:
>The X server on my decstation 3100's has a nasty habit of crashing and
>dropping a LARGE core file in /.
>
>Is there any way of inhibiting the core dump, something like the shell's
>limit command except for root?

Write a small program that calls setrlimit() to set the maximum
core dump size to zero and then calls execv() to invoke the X server.

Cause this program to be invoked instead of X, either by changing the
invocation by the OS (I forget where this is; it used to be in /etc/ttys)
or by renaming X to X.real and this little program to X.

I used this approach to cause my system's news software to run with
an adequate maximum file size (ulimit).  It works fine here (on an
RT AIX system, not ULTRIX).
-- 

	Chuck Karish		karish at mindcraft.com
	Mindcraft, Inc.		(415) 323-9000		



More information about the Comp.unix.ultrix mailing list