Blame SOURCES/telnet-0.17-errno_test_sys_bsd.patch

055396
diff -up netkit-telnet-0.17/telnet/sys_bsd.c.errnosysbsd netkit-telnet-0.17/telnet/sys_bsd.c
055396
--- netkit-telnet-0.17/telnet/sys_bsd.c.errnosysbsd	2007-09-20 10:57:58.000000000 +0200
055396
+++ netkit-telnet-0.17/telnet/sys_bsd.c	2007-09-20 11:10:08.000000000 +0200
055396
@@ -375,6 +375,7 @@ TerminalNewMode(int f)
055396
     int onoff;
055396
     int old;
055396
     cc_t esc;
055396
+    int err;
055396
 
055396
     globalmode = f&~MODE_FORCE;
055396
     if (prevmode == f)
055396
@@ -407,6 +408,12 @@ TerminalNewMode(int f)
055396
 	    tcsetattr(tin, TCSADRAIN, &tmp_tc);
055396
 #endif	/* USE_TERMIO */
055396
 	    old = ttyflush(SYNCHing|flushout);
055396
+            if (old < 0) {
055396
+	      err = errno;
055396
+              if (! ((err == EINTR) || (err == EAGAIN) || (err == ENOSPC))) {
055396
+                break;
055396
+              }
055396
+            }
055396
 	} while (old < 0 || old > 1);
055396
     }
055396