[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dumping Core on Purpose



On Thu, Jul 16, 1998 at 11:31:55AM -0400, Brian White wrote:
> Is there any way to make a program dump core and then continue execution?
> Sorta like taking a snap-shot of the current program state.

well I have made a program dump core on purpose...
how about...

kill(getpid(), SIGFPE);

the program will recive a floating point exception and dump core
(this works for any program that doesn't catch SIGFPE...
if you do catch SIGFPE (um...like why? :) ) then change itto
SIGIOT, or SIGSEGV 

you can also do this with kill at the command line (if you wanna kill it
but also wanna have a core file to see why it was acting stupid :) )

this was never tested but once when I had some evil ideas and wantd to
make programs dump core for no apparent reason 
-Steve
-- 
/* -- Stephen Carpenter <sjc@delphi.com> --- <sjc@debian.org>------------ */
E-mail "Bumper Stickers":
"A FREE America or a Drug-Free America: You can't have both!"
"honk if you Love Linux"


--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: