diff options
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 8eca4cf23bb..6e8c62395c0 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -1531,6 +1531,7 @@ exec_command(const char *cmd, if (fname[0] == '|') { is_pipe = true; + disable_sigpipe_trap(); fd = popen(&fname[1], "w"); } else @@ -1565,6 +1566,9 @@ exec_command(const char *cmd, } } + if (is_pipe) + restore_sigpipe_trap(); + free(fname); } |