diff options
author | peter <peter@FreeBSD.org> | 1998-06-28 22:28:26 +0800 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-06-28 22:28:26 +0800 |
commit | 89a764d14d65407386bad508ecf6a65e7c48215a (patch) | |
tree | 6daaefff49f2c99c374a5a8950adc9b76a7efe31 /comms | |
parent | b971c2485d754f36afd04a3912ef1308f73f5503 (diff) | |
download | freebsd-ports-gnome-89a764d14d65407386bad508ecf6a65e7c48215a.tar.gz freebsd-ports-gnome-89a764d14d65407386bad508ecf6a65e7c48215a.tar.zst freebsd-ports-gnome-89a764d14d65407386bad508ecf6a65e7c48215a.zip |
Catch a 0 return from read() on carrier loss, otherwise it spins in an
infinite loop.
Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no> (ages ago)
Diffstat (limited to 'comms')
-rw-r--r-- | comms/conserver/files/patch-ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/comms/conserver/files/patch-ac b/comms/conserver/files/patch-ac index 138896bbd677..3081ae3f0a16 100644 --- a/comms/conserver/files/patch-ac +++ b/comms/conserver/files/patch-ac @@ -1,5 +1,14 @@ --- ./conserver/group.c Sat Nov 22 20:11:49 1997 +++ ./conserver/group.c Sat Aug 23 17:19:13 1997 +@@ -406,7 +406,7 @@ + continue; + } + /* read terminal line */ +- if ((nr = read(pCEServing->fdtty, acIn, sizeof(acIn))) < 0) { ++ if ((nr = read(pCEServing->fdtty, acIn, sizeof(acIn))) <= 0) { + /* carrier lost */ + fprintf(stderr, "%s: lost carrier on %s (%s)!\n", progname, pCEServing->server, pCEServing->dfile); + #if DO_VIRTUAL @@ -750,5 +750,5 @@ CSTROUT(pCLServing->fd, "- "); if (-1 == tcsendbreak(pCEServing->fdtty, 9)) { |