From 8111394f7dfca0e3e0999187245dd04284510f57 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Mon, 3 Jun 2019 05:01:07 +0800 Subject: [PATCH] input: prevent POLLHUP. --- input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input.cpp b/input.cpp index 7a91bb2..eb4b2a9 100644 --- a/input.cpp +++ b/input.cpp @@ -2396,7 +2396,7 @@ int input_test(int getchar) unlink(CMD_FIFO); mkfifo(CMD_FIFO, 0666); - pool[NUMDEV+1].fd = open(CMD_FIFO, O_RDONLY | O_NONBLOCK); + pool[NUMDEV+1].fd = open(CMD_FIFO, O_RDWR | O_NONBLOCK); pool[NUMDEV+1].events = POLLIN; state++; }