I could not compile the secod case even with gcc. Could you please help with compilable test case with gcc and command line.
That is what my problem is, the structure with sa_sigaction exists in the sigaction.h include file, it also does incorporate the 3 return arguments (instead of just signo), but I cannot get it to compile on our system. This solution was one I found on the internet after searching for signal handlers on Linux systems. I tried a plethera of different #define flags to see if I could force it to use the correct version of the sigaction structure with the added arguments, but to no avail. I cannot get this to work on the Linux system using gcc or icc. Is there another way to do it using icc? I have to be able to capture the signal, print the call stack, and re-display the Motif window notifying the operator that a signal was caught so that they can gracefully exit the process and notify a analyst to take a look at it. The call stack printing is to assist the analyst with what the process was doing when it received a signal. Everything works with the first solution, except that it prints the "new" call stack containing just the signal handler information. The only solution I can find to get to the previous stack frame "old" call stack, was the routine #2 solution. According to the include files on the system, the system should support the second solution, I just can't figure out what I am missing to get it to compile.