What signals can terminate my program ?

I want to do some clean up when my program terminates.
What signals should I catch ?
/SIGPWR, SIGKILL, … ?

Depends on what signal you will throw at it and some may require different strategy;

For example SIGPWR, probably not a good candidate to have the clean up code write a big file ;-0
You can’t catch SIGKILL under QNX6. Other likely candidates are SIGTERM and SIGINT. You can catch SIGSEGV but that’s usually a catch 22 problem (if the code in the signal handler does a SIGSEGV program will ge t stuck in a loop). Same for SIGBUS. There is also SIGFPE to watch for.

thx,
ps. I’ve found nice page:
gnu.org/software/libc/manual … gnals.html