summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/fe-print.c')
-rw-r--r--src/interfaces/libpq/fe-print.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index 4d6688e63a2..f60231be699 100644
--- a/src/interfaces/libpq/fe-print.c
+++ b/src/interfaces/libpq/fe-print.c
@@ -9,7 +9,7 @@
* didn't really belong there.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.8 1998/07/26 04:31:36 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.9 1998/08/09 02:59:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,6 +106,7 @@ PQprint(FILE *fout,
int fs_len = strlen(po->fieldSep);
int total_line_length = 0;
int usePipe = 0;
+ pqsigfunc oldsigpipehandler = NULL;
char *pagerenv;
char buf[8192 * 2 + 1];
@@ -193,7 +194,7 @@ PQprint(FILE *fout,
{
usePipe = 1;
#ifndef WIN32
- pqsignal(SIGPIPE, SIG_IGN);
+ oldsigpipehandler = pqsignal(SIGPIPE, SIG_IGN);
#endif
}
else
@@ -309,7 +310,7 @@ PQprint(FILE *fout,
_pclose(fout);
#else
pclose(fout);
- pqsignal(SIGPIPE, SIG_DFL);
+ pqsignal(SIGPIPE, oldsigpipehandler);
#endif
}
if (po->html3 && !po->expanded)