summary refs log tree commit diff
path: root/bin/dtch.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/dtch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dtch.c b/bin/dtch.c
index 6fe85838..8c174f82 100644
--- a/bin/dtch.c
+++ b/bin/dtch.c
@@ -223,7 +223,7 @@ static int atch(int argc, char *argv[]) {
         { .fd = pty, .events = POLLIN },
     };
     while (0 < poll(fds, 2, -1)) {
-        if (fds[0].revents == POLLIN) {
+        if (fds[0].revents & POLLIN) {
             ssize_t readSize = read(STDIN_FILENO, buf, sizeof(buf));
             if (readSize < 0) err(EX_IOERR, "read(%d)", STDIN_FILENO);
 
@@ -234,7 +234,7 @@ static int atch(int argc, char *argv[]) {
             if (writeSize < readSize) errx(EX_IOERR, "short write(%d)", pty);
         }
 
-        if (fds[1].revents == POLLIN) {
+        if (fds[1].revents & POLLIN) {
             ssize_t readSize = read(pty, buf, sizeof(buf));
             if (readSize < 0) err(EX_IOERR, "read(%d)", pty);
 
ref='/catgirl/commit/ui.c?h=1.4&id=872608e5c4fb814604a359a4b8b2f3bcf317cf0f&follow=1'>Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe