is there any way to trace a system signal to it's generator?

Hi all,

I'm having some problem with my app on Debian Lenny system. I have 16 instances running and one or two of them may receive a SIGTERM signal somewhere from the system.

I'm wondering if there is a way of tracing the signal to it's originator so I can see where it's coming from?

Thanks.
IIRC if you have your app register for SIGTERM via sigaction() instead of signal(), the struct siginfo_t that you get contains enough information to tell you the originating PID.
Thanks jsmith. I was using signal() and am switching to sigaction() as we speak.

Just out of curiosity, is there any way to trace that while using signal()?
No, there isn't.

signal() is actually a deprecated function in favor of sigaction().
Topic archived. No new replies allowed.