From 1addd067e63a09f8dd22d6b752afd6f1943e94bd Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 28 Jun 1998 14:53:48 +0000 Subject: Another spin loop bug. On dropped network connections, console(8) can also spin getting a 0 return from write(). (it's only testing for -1). --- comms/conserver/files/patch-af | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'comms/conserver') diff --git a/comms/conserver/files/patch-af b/comms/conserver/files/patch-af index 00a372ca9dd8..96044368ca10 100644 --- a/comms/conserver/files/patch-af +++ b/comms/conserver/files/patch-af @@ -26,6 +26,13 @@ + (void)tcsetattr(0, TCSANOW, &o_tios); #else #if USE_TERMIO +@@ -478,5 +478,5 @@ + + while (0 != iLen) { +- if (-1 == (nr = write(fd, pcBuf, iLen))) { ++ if (0 <= (nr = write(fd, pcBuf, iLen))) { + c2cooked(); + fprintf(stderr, "%s: lost connection\n", progname); @@ -950,5 +950,5 @@ iRem = iMax; i = 0; -- cgit v1.2.3