summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-fe.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-01-09 02:02:43 +0000
committerBruce Momjian <bruce@momjian.us>2004-01-09 02:02:43 +0000
commit0150dbdce54f24596547048d4d6617d62a2570a4 (patch)
treeb2093a0e2efb39f29ce45bc3464b25dd6b298fba /src/interfaces/libpq/libpq-fe.h
parentacc57543debdd2de93c2c5df31702ef8ecd461b5 (diff)
downloadpostgresql-0150dbdce54f24596547048d4d6617d62a2570a4.tar.gz
Allow libpq to do thread-safe SIGPIPE handling. This allows it to
ignore SIGPIPE from send() in libpq, but terminate on any other SIGPIPE, unless the user installs their own signal handler. This is a minor fix because the only time you get SIGPIPE from libpq's send() is when the backend dies.
Diffstat (limited to 'src/interfaces/libpq/libpq-fe.h')
-rw-r--r--src/interfaces/libpq/libpq-fe.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 4b4eb9ab4d..f6ea1f4ba7 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.101 2003/11/29 22:41:28 pgsql Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.102 2004/01/09 02:02:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -450,6 +450,14 @@ extern int PQmblen(const unsigned char *s, int encoding);
/* Get encoding id from environment variable PGCLIENTENCODING */
extern int PQenv2encoding(void);
+/* === in fe-secure.c === */
+
+/*
+ * Indicates whether the libpq thread is in send().
+ * Used to ignore SIGPIPE if thread is in send().
+ */
+pqbool PQinSend(void);
+
#ifdef __cplusplus
}
#endif