core dumps

SHAWN%mit-ml at sri-unix.UUCP SHAWN%mit-ml at sri-unix.UUCP
Tue Nov 1 12:41:00 AEST 1983


From:  Shawn F. McKay <SHAWN at mit-ml>


Why? if you don't reset the catch, it will core dump the second time,
if you use abort() however, I see your point, but then, you just get
rid of the abort() system call when debug is defined. If you reset
the catch, and have a loop counter, then there is no chance of a loop,
and even without a counter, I don't really see where looping comes in.
Something like this:

#include <stdio.h>
#include <signal.h>

int	trap();

main()
{
	signal(SIGQUIT, trap);		/* bye bye sigquit */
	
	.... body of program

}

trap()
{
	signal(SIGQUIT, trap);		/* reset for next time */
	puts("Ouch!");			/* speak to me! */
}

should NOT loop(??).. if it does, please explain how...

			Yours In Hacking,
			    -Shawn



More information about the Comp.unix.wizards mailing list