Quote:
Q: do signals go on to the STACK
|
No - of course not!
But a program certainly *has* a stack when it *gets* a signal.
And you can see the stack if you attach to the process with GDB. You can do this in any of three ways:
a) Starting GDB, then "attach" to the already-running PID
b) "run" the process directly from GDB
... or ...
c) Specify the program name and PID as GDB command line arguments ("gdb name-of-executable -pid process-id")
"pstack" is great if the program is conveniently "stopped" for you. But it probably wouldn't work well to try capturing the stack at the moment you hit the signal handler (and catch it before it exited)