Skip to content

Commit feed7cf

Browse files
committed
More clearly describe why PQinSend returns false for non-threaded libpq.
1 parent fd44e2f commit feed7cf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/interfaces/libpq/fe-secure.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.36 2004/01/09 02:17:15 momjian Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.37 2004/02/10 15:21:24 momjian Exp $
1515
*
1616
* NOTES
1717
* The client *requires* a valid server certificate. Since
@@ -1122,6 +1122,11 @@ PQinSend(void)
11221122
return (pthread_getspecific(thread_in_send) /* has it been set? */ &&
11231123
*(char *)pthread_getspecific(thread_in_send) == 't') ? true : false;
11241124
#else
1125-
return false; /* No threading, so we can't be in send() */
1125+
/*
1126+
* No threading: our code ignores SIGPIPE around send().
1127+
* Therefore, we can't be in send() if we are checking
1128+
* from a SIGPIPE signal handler.
1129+
*/
1130+
return false;
11261131
#endif
11271132
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy