dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit b08e6ad32e80e1aca884788a325ca1798ef9957e
parent 609afa05eb5612819b915588b032d4cf6474b3fc
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 17 Oct 2014 15:49:37 +0200

Make editor stdout reading more robust

Diffstat:
dvtm.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -1324,8 +1324,11 @@ handle_editor(Client *c) { copyreg.len = 0; while (copyreg.len < copyreg.size) { ssize_t len = read(c->editor_fds[1], copyreg.data + copyreg.len, copyreg.size - copyreg.len); - if (len == -1 && errno == EINTR) - continue; + if (len == -1) { + if (errno == EINTR) + continue; + break; + } if (len == 0) break; copyreg.len += len;