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

Commitbe41a9b

Browse files
Fix errorhandling for reading from a pipe
When reading a line from a pipe failed on no data being read, theerrorhandling was erroneously logging with %m even thoug no errordescription is available for %m to print. This flaw accidentallyintroduced in5c7038d.Reported-by: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/baa34329-f431-46af-bf74-1a78fdc90e4f@eisentraut.org
1 parent6929e13 commitbe41a9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/common/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ pipe_read_line(char *cmd)
393393
log_error(errcode_for_file_access(),
394394
_("could not read from command \"%s\": %m"),cmd);
395395
else
396-
log_error(errcode_for_file_access(),
397-
_("no data was returned by command \"%s\": %m"),cmd);
396+
log_error(errcode(ERRCODE_NO_DATA),
397+
_("no data was returned by command \"%s\""),cmd);
398398
}
399399

400400
(void)pclose_check(pipe_cmd);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp