Restore psql's SIGPIPE setting if popen() fails.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 433e65c2bd907723a5d93b3f2ff0bdbc77a0b625
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2016-12-07T17:39:24Z
Releases: 9.3.16
Restore psql's SIGPIPE setting if popen() fails.

Ancient oversight in PageOutput(): if popen() fails, we'd better reset
the SIGPIPE handler before returning stdout, because ClosePager() won't.
Noticed while fixing the empty-PAGER issue.

Files

PathChange+/−
src/bin/psql/print.c modified +4 −0