[vtkusers] Threads and SIGSEGV.

Luca Cappa luca.cappa at i-medlab.com
Thu Jul 21 03:38:45 EDT 2005


Hello all,

I wrote a program which processes some data in a very long time. I am 
catching any SIGSEGV my app would produce to write in a XML file what 
data to skip
next time the program is started again: in this way my program does not 
crash again processing the same data again.

The problem is that I am using VTK, and when the crash occurs in a VTK 
thread, my signal handler is not called. Any help on how to catch 
SIGSEGV signal emitted by a VTK thread?

Actually my code that installs the handler is something like:

    memset (&mSigAction, 0, sizeof (mSigAction));
    sigemptyset (&mSigAction.sa_mask);
    mSigAction.sa_flags = 0;
    mSigAction.sa_flags = mSigAction.sa_flags | SA_NODEFER | SA_RESETHAND;
    mSigAction.sa_handler = &segvHandler;


which is called by the main( ) of my program.

Thanks in advance,

Luca





More information about the vtkusers mailing list