mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-28 12:01:50 +02:00
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
This commit is contained in:
parent
749320cdc3
commit
fa83e9e23c
@ -315,6 +315,11 @@ shell_run_command(bbsink_shell *sink, const char *filename)
|
||||
|
||||
/* Run it. */
|
||||
sink->pipe = OpenPipeStream(sink->current_command, PG_BINARY_W);
|
||||
if (sink->pipe == NULL)
|
||||
ereport(ERROR,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not execute command \"%s\": %m",
|
||||
sink->current_command)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user