mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-28 23:47:20 +02:00
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.
This commit is contained in:
parent
bb39f58f76
commit
29babe981c
@ -2884,6 +2884,8 @@ PageOutput(int lines, const printTableOpt *topt)
|
||||
pagerpipe = popen(pagerprog, "w");
|
||||
if (pagerpipe)
|
||||
return pagerpipe;
|
||||
/* if popen fails, silently proceed without pager */
|
||||
restore_sigpipe_trap();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user