git.y1.nz

mtm

Ncurses-based terminal multiplexer
download: https://git.y1.nz/archives/mtm.tar.gz
Files | Log | Refs

commit 696840c2502d1adbc3b8aa27784791e77d6c5081
parent 702e103f53d420baf72358d108a0f998249bc12f
Author: Rob King <jking@deadpixi.com>
Date:   Mon, 26 Jun 2017 16:21:59 -0500

Don't starve other processes.

A process that wrote a lot of input quickly to the terminal could
starve the other managed terminals and input processing.

Diffstat:
Mmtm.c4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mtm.c b/mtm.c @@ -705,10 +705,8 @@ getinput(NODE *n, fd_set *f) /* Recursively check all ptty's for input. */ if (n && n->t == VIEW && n->pt > 0 && FD_ISSET(n->pt, f)){ ssize_t r = read(n->pt, iobuf, BUFSIZ); - while (r > 0){ + if (r > 0) vtparser_write(n->vp, iobuf, r); - r = read(n->pt, iobuf, BUFSIZ); - } if (r < 0 && errno != EINTR && errno != EWOULDBLOCK) return deletenode(n), false; }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.