Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit433e65c

Browse files
committed
Restore psql's SIGPIPE setting if popen() fails.
Ancient oversight in PageOutput(): if popen() fails, we'd better resetthe SIGPIPE handler before returning stdout, because ClosePager() won't.Noticed while fixing the empty-PAGER issue.
1 parent82eb5c5 commit433e65c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/bin/psql/print.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,10 @@ PageOutput(int lines, unsigned short int pager)
22172217
pagerpipe=popen(pagerprog,"w");
22182218
if (pagerpipe)
22192219
returnpagerpipe;
2220+
/* if popen fails, silently proceed without pager */
2221+
#ifndefWIN32
2222+
pqsignal(SIGPIPE,SIG_DFL);
2223+
#endif
22202224
#ifdefTIOCGWINSZ
22212225
}
22222226
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp