From 151bbf000d3943fda0984135a8fecbe1183a1ebd Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 9 May 2020 14:40:52 +0530 Subject: [PATCH] Increase pipe capacity --- src/nnn.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/nnn.c b/src/nnn.c index 0a5dd82f..b63ea259 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4312,6 +4312,15 @@ static bool run_selected_plugin(char **path, const char *file, char *runfile, ch if (fd == -1) return FALSE; +#ifdef __linux__ + DPRINTF_D(fcntl(fd, F_GETPIPE_SZ)); + /* Increase the pipe buffer size to 1 MB */ + if (fcntl(fd, F_SETPIPE_SZ, 1024*1024) == -1) { + DPRINTF_S(strerror(errno)); + } + DPRINTF_D(fcntl(fd, F_GETPIPE_SZ)); +#endif + /* Run plugin from command */ if (*file == '_') run_cmd_as_plugin(*path, file, runfile);