Date: Wed, 1 Mar 2000 12:04:00 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Marcus cc: djgpp AT delorie DOT com Subject: Re: Prevent crash on free() In-Reply-To: <89gd09$f0k$1@cubacola.tninet.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 29 Feb 2000, Marcus wrote: > Is it possible to do a catch a crash? :) > I mean, prevent the program from crashing. Instead raise an exception or > something like that. You can install a handler for the signal SIGSEGV. If that handler longjmp's, then it will indeed work. But if it returns to the same place where the problem happened, the progarm will still crash. You install a signal handler by calling library function `signal'. Look it up in the library reference docs.