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

Commit8e82db9

Browse files
committed
basebackup_to_shell: Check for a NULL return from OpenPipeStream.
Per complaint from Peter Eisentraut.Discussion:http://postgr.es/m/4f1707cc-2432-da35-64a2-5c2a8d92a388@enterprisedb.com
1 parent4b1ad19 commit8e82db9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎contrib/basebackup_to_shell/basebackup_to_shell.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ shell_run_command(bbsink_shell *sink, const char *filename)
263263

264264
/* Run it. */
265265
sink->pipe=OpenPipeStream(sink->current_command,PG_BINARY_W);
266+
if (sink->pipe==NULL)
267+
ereport(ERROR,
268+
(errcode_for_file_access(),
269+
errmsg("could not execute command \"%s\": %m",
270+
sink->current_command)));
266271
}
267272

268273
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp