Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL
От | Manfred Spraul |
---|---|
Тема | Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL |
Дата | |
Msg-id | 3FA572E1.8050609@colorfullife.com обсуждение исходный текст |
Ответ на | Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL (AgentM <agentm@webopticon.com>) |
Ответы |
Re: Avoiding SIGPIPE (was Re: OSDL DBT-2 w/ PostgreSQL
|
Список | pgsql-hackers |
AgentM wrote: > That wouldn't offer a solution for people who use SIGPIPE for other > things during the lifetime of the program (after creating the > connection) and if a SIGPIPE handler is called due to the connection, > the handler won't be expecting the source, and polling signal for > state is essentially what you do now. Instead, I propose a > PQsigpipeOK/PQacceptsigpipe/PQrecvsigpipe(PGconn*) or something to > that effect which skips this check for the connection. That way, > programmers are aware that the connection could call their SIGPIPE > handler because they explicitly request it and the library remains > backwards-compatible. If I understand libpq sources correctly, the first packets are send during connection setup - PQsigpipeOK(PGconn *) would be too late. That's why I added "sigpipe=caller" as a new flag for PQconnectdb. -- Manfred
В списке pgsql-hackers по дате отправления: