Manfred Spraul <manfred@colorfullife.com> writes:
> ... But the SIG_IGN/restore
> sequence affects the whole app - PQconnectdb calls would result in
> randomly dropped SIGPIPE signals.
Good point. AFAICS we lose anyway if we don't have sigaction()
available, but hopefully any multithreaded platform has sigaction().
I still don't like modifying pqsignal's API though. What I suggest
is adding a function like "pqsignalinquire(signalno)" to pqsignal.c,
defined to return the signal handler without changing it ... that is,
take the system-dependent code you were going to put in fe-connect.c
and put it in pqsignal.c instead.
regards, tom lane