nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 1ae90e205aa5b1ff50dc6601dee526ee1581bfe2
parent d53086d38dcf11280ecc628a6d6b88109f1553ab
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 23 Apr 2018 17:56:58 +0200

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

This fixes https://savannah.gnu.org/bugs/?53723.

Diffstat:
Msrc/text.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -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");