If you can modify application's code (at least the main() entry point) you
can register signal handlers for SIGSEGV, SIGABRT (most common causes of
program crashes) etc. Do "man signal" for more info. If the program is in
other languages then there should be corresponding ways to register these
signal handlers.

If you don't have access to source code then only way that I can suggest is
running from debugger.

If you end up registering your signal handlers - do only little in those
signal handlers. It's not a good idea to keep executing once you have
corrupted memory - you might run into more ugly errors.

HTH
Jayesh

On 9/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Is it possible for an application to trap abnormal termination? In other
> words, can a callback be registered that will be invoked when the
> application is about to be shut down because of an error that the
> application itself has caused (e.g. memory allocation errors or other
> problems that would cause the OS to terminate the application).
>
>
> David Hazel
> _______________________________________________
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to