1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

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).
This commit is contained in:
Peter Wemm 1998-06-28 14:53:48 +00:00
parent 13666592ed
commit 1addd067e6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=11583

View File

@ -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;