dvtm

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

commit 8e5feb7ecc035203fbe3223587fa22908032b38d
parent 708e968859cc59ce6da612afdb865d920887a8f8
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Mon, 29 Apr 2013 22:11:38 +0200

Handle write(2) errors correctly

Diffstat:
vt.c | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/vt.c b/vt.c @@ -1616,9 +1616,12 @@ int vt_write(Vt *t, const char *buf, int len) while (len > 0) { int res = write(t->pty, buf, len); - if (res < 0 && errno != EAGAIN && errno != EINTR) - return -1; - + if (res < 0) { + if (errno != EAGAIN && errno != EINTR) + return -1; + else + continue; + } buf += res; len -= res; }