diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 85ac76b8fe3..b48fb8dd7ff 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -2217,6 +2217,10 @@ PageOutput(int lines, unsigned short int pager) pagerpipe = popen(pagerprog, "w"); if (pagerpipe) return pagerpipe; + /* if popen fails, silently proceed without pager */ +#ifndef WIN32 + pqsignal(SIGPIPE, SIG_DFL); +#endif #ifdef TIOCGWINSZ } #endif