aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1998-06-28 14:53:48 +0000
committerPeter Wemm <peter@FreeBSD.org>1998-06-28 14:53:48 +0000
commit1addd067e63a09f8dd22d6b752afd6f1943e94bd (patch)
tree2a2ce3e515aff09c5944a60d0cf7fd2e92b575da /comms
parent13666592edd8e46adafccd1e5f88d545110619eb (diff)
downloadports-1addd067e63a09f8dd22d6b752afd6f1943e94bd.tar.gz
ports-1addd067e63a09f8dd22d6b752afd6f1943e94bd.zip
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).
Notes
Notes: svn path=/head/; revision=11583
Diffstat (limited to 'comms')
-rw-r--r--comms/conserver/files/patch-af7
1 files changed, 7 insertions, 0 deletions
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;