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

Appearance settings

Commit be41a9b

Browse filesBrowse files
Fix errorhandling for reading from a pipe
When reading a line from a pipe failed on no data being read, the errorhandling was erroneously logging with %m even thoug no error description is available for %m to print. This flaw accidentally introduced in 5c7038d. Reported-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/baa34329-f431-46af-bf74-1a78fdc90e4f@eisentraut.org
1 parent 6929e13 commit be41a9b
Copy full SHA for be41a9b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/common/exec.c

Copy file name to clipboardExpand all lines: src/common/exec.c
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.