diff options
Diffstat (limited to 'src/bin/psql/copy.c')
-rw-r--r-- | src/bin/psql/copy.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c index c0fc28373a9..a09408bf550 100644 --- a/src/bin/psql/copy.c +++ b/src/bin/psql/copy.c @@ -37,7 +37,7 @@ * where 'filename' can be one of the following: * '<file path>' | PROGRAM '<command>' | stdin | stdout | pstdout | pstdout * and 'query' can be one of the following: - * SELECT | UPDATE | INSERT | DELETE + * SELECT | UPDATE | INSERT | DELETE * * An undocumented fact is that you can still write BINARY before the * tablename; this is a hangover from the pre-7.3 syntax. The options @@ -312,9 +312,7 @@ do_copy(const char *args) fflush(stdout); fflush(stderr); errno = 0; -#ifndef WIN32 - pqsignal(SIGPIPE, SIG_IGN); -#endif + disable_sigpipe_trap(); copystream = popen(options->file, PG_BINARY_W); } else @@ -399,9 +397,7 @@ do_copy(const char *args) } success = false; } -#ifndef WIN32 - pqsignal(SIGPIPE, SIG_DFL); -#endif + restore_sigpipe_trap(); } else { |