From af3c3d4162639db7a94b4ed7fa77a10b013bf50c Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Mon, 15 Oct 2018 13:36:00 +0200 Subject: [PATCH] Always set POLLOUT on slave poll --- ttynvt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ttynvt.c b/ttynvt.c index e4763c0..3c996f3 100644 --- a/ttynvt.c +++ b/ttynvt.c @@ -955,13 +955,15 @@ ttynvt_poll(fuse_req_t req, struct fuse_file_info *info, struct fuse_pollhandle *ph) { ttynvt_t *tty = (ttynvt_t *) (uintptr_t) info->fh; - int revents = 0; + int revents; DBG2("%s: tty->pollin=%d tty->error/epipe=%d/%d\n", __func__, tty->pollin, tty->error, tty->epipe); _update_notify(tty, ph); + revents = POLLOUT; + if (tty->pollin) { tty->pollin = 0; @@ -970,7 +972,7 @@ ttynvt_poll(fuse_req_t req, struct fuse_file_info *info, if (tty->error) { if (tty->epipe == 0) - revents = POLLHUP | POLLIN; + revents |= POLLHUP | POLLIN; else revents = 0; }