mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
commit 495ab6c4d67894a001be2867c9ffab5a979a68a6 parent fe6dcdf6c1f842ddc8e42399d62ad55143ff5a99 Author: Rob King <jking@deadpixi.com> Date: Thu, 13 Apr 2017 14:40:30 -0500 Fixed potential (never actually seen) bug in safewrite. Diffstat:
| M | mtm.c | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mtm.c b/mtm.c @@ -168,6 +168,8 @@ safewrite(int fd, const char *b, size_t n) /* Write, checking for errors. */ ssize_t s = write(fd, b + w, n - w); if (s < 0 && errno != EINTR) return; + else + s = 0; w += (size_t)s; } } @@ -240,7 +242,7 @@ getshell(void) /* Get the user's preferred shell. */ { \ COMMONVARS #define ENDHANDLER \ - n->repc = 0; \ + n->repc = 0; /* control sequences cannot be repeated */ \ } HANDLER(bell) /* Terminal bell. */
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.