Options for signal handling

Option

Default

-handle-signals 
–ignore-signals
 

none
none

PureCoverage installs a signal handler for many of the possible software signals which are delivered to an instrumented process. The signal handler prints an informative message and saves coverage data to the .pcv file in case the process crashes.

The signal handler installed by PureCoverage outputs a signal message to stderr, or to the Purify Viewer if the process is Purify'd. If the signal is a fatal signal such as a SEGV, and no user signal handler has been installed by the program to catch such a condition, the coverage data is written out to the .pcv file before the normal signal termination occurs. If the instrumented program has installed a signal handler, the PureCoverage handler will pass control to that handler instead.

The default list of signals that are handled by PureCoverage is:

SIGHUP SIGINT SIGQUIT SIGILL SIGIOT SIGABRT SIGEMT SIGFPE SIGBUS SIGSEGV SIGSYS SIGPIPE SIGTERM SIGUSR1 SIGUSR2 SIGPOLL SIGXCPU SIGXFSZ SIGFREEZE SIGTHAW SIGRTMIN SIGRTMAX

SIGHUP SIGINT SIGQUIT SIGILL SIGABRT SIGEMT SIGFPE SIGBUS SIGSEGV SIGSYS SIGPIPE SIGTERM SIGUSR1 SIGUSR2 SIGLOST SIGRESERVE SIGDIL SIGXCPU SIGXFSZ

To skip handling signals in this list, set the value of the option -ignore-signals to a comma-separated list of the signal names not to be handled. For example:

-ignore-signals=SIGSEGV,SIGBUS

To handle additional signals, set the value of the option -handle-signals to a comma-separated list of the additional signal names to be handled. For example:

-handle-signals=SIGALRM,SIGCHLD

These signals are added to the current list of handled signals.

PureCoverage does not handle SIGKILL, SIGSTOP, or SIGTRAP, since doing so interferes with normal program operation. If you specify these signals in -handle-signals, they are silently ignored.

The default action upon delivery of SIGALRM is to terminate the process. PureCoverage does not handle this signal by default, since functions like sleep use it internally. However, if you see a process terminated with a message like Alarm clock, you can set -handle-signals=SIGALRM to save data when the program is terminated.

See the man pages for signal and sigmask, and the files
/usr/include/signal.h
and /usr/include/sys/signal.h for more information on signals.