>From 459868c2580930824ef71666d2ad54d26a737bb2 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 15 Jan 2018 11:15:05 +0100 Subject: [PATCH] startup: allow a named pipe as file argument when --noread is used This fixes https://savannah.gnu.org/bugs/?52896. Reported-by: Miki Strange --- src/files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index fd02814c..b77d6779 100644 --- a/src/files.c +++ b/src/files.c @@ -435,7 +435,8 @@ bool open_buffer(const char *filename, bool undoable) if (strcmp(filename, "") != 0) { struct stat fileinfo; - if (stat(realname, &fileinfo) == 0 && !S_ISREG(fileinfo.st_mode)) { + if (stat(realname, &fileinfo) == 0 && !(S_ISREG(fileinfo.st_mode) || + (ISSET(NOREAD_MODE) && S_ISFIFO(fileinfo.st_mode)))) { if (S_ISDIR(fileinfo.st_mode)) statusline(ALERT, _("\"%s\" is a directory"), realname); else -- 2.14.3