Commit 1ae90e20 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

command-execution: do not crash when opening the pipe would fail

This fixes https://savannah.gnu.org/bugs/?53723.
parent d53086d3
Showing with 3 additions and 3 deletions
+3 -3
......@@ -1144,9 +1144,9 @@ bool execute_command(const char *command)
stream = fdopen(fd[0], "rb");
if (stream == NULL)
nperror("fdopen");
read_file(stream, 0, "stdin", TRUE);
statusline(ALERT, _("Failed to open pipe: %s"), strerror(errno));
else
read_file(stream, 0, "pipe", TRUE);
if (wait(NULL) == -1)
nperror("wait");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment