mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Rework libpq threaded SIGPIPE handling to avoid interference with
calling applications. This is done by blocking sigpipe in the libpq thread and using sigpending/sigwait to possibily discard any sigpipe we generated.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.290 2004/12/01 23:42:26 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.291 2004/12/02 15:32:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -866,15 +866,6 @@ connectDBStart(PGconn *conn)
|
||||
const char *node = NULL;
|
||||
int ret;
|
||||
|
||||
#ifdef ENABLE_THREAD_SAFETY
|
||||
#ifndef WIN32
|
||||
static pthread_once_t check_sigpipe_once = PTHREAD_ONCE_INIT;
|
||||
|
||||
/* Check only on first connection request */
|
||||
pthread_once(&check_sigpipe_once, pq_check_sigpipe_handler);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!conn)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user