Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> Posix provides information about the source of the signal when using
> SA_SIGINFO style handlers via si_code/si_pid. That information has been
> available for a *long* while
> (c.f. http://pubs.opengroup.org/onlinepubs/7908799/xsh/signal.h.html)
That does not mean that it exists on all the platforms we support;
Windows in particular is likely to be an issue.
I concur with Heikki that you're probably solving this at the wrong
end anyway, since the next question you'll be asking is *why* did
process X send that signal.
regards, tom lane