#atEnd must read interruptable
authorClaus Gittinger <cg@exept.de>
Wed, 20 Aug 1997 16:48:38 +0200
changeset 2875 54c89acc73ce
parent 2874 020627074c9e
child 2876 fb3fed7470be
#atEnd must read interruptable
ExtStream.st
ExternalStream.st
--- a/ExtStream.st	Wed Aug 20 16:45:54 1997 +0200
+++ b/ExtStream.st	Wed Aug 20 16:48:38 1997 +0200
@@ -3490,7 +3490,12 @@
         /*
          * read ahead ...
          */
-        __READBYTE__(ret, f, &c, _buffered);
+        do {
+            __BEGIN_INTERRUPTABLE__
+            __READBYTE__(ret, f, &c, _buffered);
+            __END_INTERRUPTABLE__
+        } while ((ret < 0) && (errno == EINTR));
+
         if (ret > 0) {
             __UNGETC__(c&0xff, f, _buffered);
             RETURN (false);
@@ -3937,6 +3942,6 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.138 1997-08-20 14:45:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.139 1997-08-20 14:48:38 cg Exp $'
 ! !
 ExternalStream initialize!
--- a/ExternalStream.st	Wed Aug 20 16:45:54 1997 +0200
+++ b/ExternalStream.st	Wed Aug 20 16:48:38 1997 +0200
@@ -3490,7 +3490,12 @@
         /*
          * read ahead ...
          */
-        __READBYTE__(ret, f, &c, _buffered);
+        do {
+            __BEGIN_INTERRUPTABLE__
+            __READBYTE__(ret, f, &c, _buffered);
+            __END_INTERRUPTABLE__
+        } while ((ret < 0) && (errno == EINTR));
+
         if (ret > 0) {
             __UNGETC__(c&0xff, f, _buffered);
             RETURN (false);
@@ -3937,6 +3942,6 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.138 1997-08-20 14:45:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.139 1997-08-20 14:48:38 cg Exp $'
 ! !
 ExternalStream initialize!