Disabling core dumps

lwa%mit-csr at sri-unix.UUCP lwa%mit-csr at sri-unix.UUCP
Thu Oct 27 01:37:00 AEST 1983


Well, Ron's suggestion will work, but it seems a little inelegant (in
particular, if you forget to remove the 'core' file later, it will
prevent future programs from dumping core).

A slightly more elegant solution is to add a signal handler for the
signal you're getting (SIGSEG, I think?) which just causes the process
to exit.  Like this:

/* at the beginning of main() */

	extern	int	segflt();

	signal(SIGSEG, segflt);

		.
		.
		.

segflt()
{
	exit(1);
}
					-Larry Allen
-------



More information about the Comp.unix.wizards mailing list