Introduction
Introduction Statistics Contact Development Disclaimer Help
tcmd: write() may block even with POLLOUT - neatvi - [fork] simple vi-type edit…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit 9bf5bfb3a0527155ff78c62a89f1dff81df6e113
parent 57077e595860fb487d95316fc8dfc41df965342f
Author: Ali Gholami Rudi <[email protected]>
Date: Mon, 1 Aug 2016 15:18:47 +0430
cmd: write() may block even with POLLOUT
Diffstat:
M cmd.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/cmd.c b/cmd.c
t@@ -1,3 +1,4 @@
+#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
t@@ -69,6 +70,7 @@ char *cmd_pipe(char *cmd, char *ibuf, int iproc, int oproc)
signal(SIGINT, SIG_IGN);
term_done();
}
+ fcntl(ifd, F_SETFL, fcntl(ifd, F_GETFL, 0) | O_NONBLOCK);
fds[0].fd = ofd;
fds[0].events = POLLIN;
fds[1].fd = ifd;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.