aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/copy.c')
-rw-r--r--src/bin/psql/copy.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
index f1eb518de79..82edf431783 100644
--- a/src/bin/psql/copy.c
+++ b/src/bin/psql/copy.c
@@ -310,9 +310,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
@@ -397,9 +395,7 @@ do_copy(const char *args)
}
success = false;
}
-#ifndef WIN32
- pqsignal(SIGPIPE, SIG_DFL);
-#endif
+ restore_sigpipe_trap();
}
else
{