Subject: Re: Programming question - signal handlers
To: Paul Goyette <paul@whooppee.com>
From: Johnny Billquist <bqt@update.uu.se>
List: netbsd-users
Date: 07/08/2002 14:14:16
On Mon, 8 Jul 2002, Paul Goyette wrote:

> There's this program I've been working on, and I'm having some
> difficulties dealing with signal handlers.  The program explicitly
> catches and handles SIGSEGV and takes some clean-up action so that
> some datafiles don't get left corrupted.  But it the process, the
> "normal" action of dropping a .core file doesn't happen, so I'm left
> without a clue as to where the SEGV occurred.
> 
> So, is there any was I can make the program do BOTH the default
> sigaction AND the specified handler?  Or, alternatively, is there a
> routine I can call from within the program's handler that will drop
> a core file suitable for use in gdb?

Why don't you remove the signal handler in the handler, and the return for
a retry? That should create the core at the correct spot, or am I missing
something?

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol