How to stop core files in /

Philippe Deschamp deschamp at seti.inria.fr
Wed Jun 13 02:06:22 AEST 1990


   Sorry for the long citations. I'm still a beginner!

In article <IaQKjXq00VRUI0xVYB at andrew.cmu.edu> mikem+ at andrew.cmu.edu
(Michael Meyer) writes in substance:
Michael> The X server on my decstation 3100 crashes and drops a LARGE
Michael> core file in /.  I would prefer not to have my / filesystem
Michael> filled up with the core file.

In article <1650 at vela.acs.oakland.edu> schemers at vela.acs.oakland.edu
(Roland Schemers III) answers along this line:
Roland> If you have root access try:
Roland> 	su -c 'cp /dev/null /core; chmod 0 /core'
Roland> That might stop it.

In article <SPA.90Jun11125248 at hal.fctunl.rccn.pt>, spa at fctunl.rccn.pt
(Salvador Pinto Abreu) responds with:
Salvador> I'm not sure this would work, as the X server runs as root.
Salvador> However, you may do something along the lines of:
Salvador> 	su -c 'rm -f /core; ln -s /dev/null /core'
Salvador> This doesn't prevent your program from dumping core,
Salvador> however, the dump itself goes into a black hole and won't
Salvador> bother you anymore.

   I do not have root access on a DECstation, but I cannot see why the
usual trick of creating a *directory* "/core" would not work:
	su -c 'rm -f /core; mkdir /core'
This should save the CPU the burden of a dump :-)
	time cat /vmunix > /dev/null
	0.0u 1.0s 0:11 9% 51+71+123k(24) 458+1io 0pf+0w
whereas:
	mkdir core; time cat /vmunix > core
	core: Is a directory
	0.0u 0.0s 0:00 100% 0+0+0k(0) 0+0io 0pf+0w
--
					Philippe Deschamp.
Tlx: 697033F   Fax: +33 (1) 39-63-53-30   Tel: +33 (1) 39-63-58-58
Email: deschamp at seti.inria.fr   ||   ...!inria!deschamp
Smail: INRIA, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France



More information about the Comp.unix.ultrix mailing list