mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03: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
4b1ad19a4e
commit
8e82db97b0
@ -263,6 +263,11 @@ shell_run_command(bbsink_shell *sink, const char *filename)
|
|||||||
|
|
||||||
/* Run it. */
|
/* Run it. */
|
||||||
sink->pipe = OpenPipeStream(sink->current_command, PG_BINARY_W);
|
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…
x
Reference in New Issue
Block a user