command-execution: do not crash when opening the pipe would fail
This fixes https://savannah.gnu.org/bugs/?53723.
Этот коммит содержится в:
родитель
d53086d38d
Коммит
1ae90e205a
@ -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");
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user