Re: SIGPIPE handling
От | Tom Lane |
---|---|
Тема | Re: SIGPIPE handling |
Дата | |
Msg-id | 28720.1069003983@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: SIGPIPE handling (Manfred Spraul <manfred@colorfullife.com>) |
Ответы |
Re: SIGPIPE handling
|
Список | pgsql-patches |
Manfred Spraul <manfred@colorfullife.com> writes: > But how should libpq notice that the caller handles sigpipe signals? > a) autodetection - if the sigpipe handler is not the default, then the > caller knows what he's doing. > b) a new PGsetsignalhandler() function. > c) an additional flag passed to PGconnectdb. > Tom preferred a). One problem is that the autodetection is not perfect: > an app could block the signal with sigprocmask, or it could install a > handler that doesn't expect sigpipe signals from within libpq. > I would prefer b), because it guarantees that the patch has no effect on > existing apps. I have no particular objection to (b) either, but IIRC there was some dispute about whether it sets a global or per-connection flag. ISTM that "I have a correct signal handler" is a global assertion (within one process) and so a global flag is appropriate. Someone else (Bruce?) didn't like that though. regards, tom lane
В списке pgsql-patches по дате отправления: