This would be the overall patch.

Paolo
diff --git a/kernel/FileDescr.st b/kernel/FileDescr.st
index f424cd2..15ace97 100644
--- a/kernel/FileDescr.st
+++ b/kernel/FileDescr.st
@@ -286,6 +286,7 @@ do arbitrary processing on the files.'>
        <category: 'basic'>
        self isOpen ifFalse: [SystemExceptions.FileError signal: 'file closed'].
        File checkError.
+        self pastEnd.
        ^0
     ]
 
@@ -797,7 +798,8 @@ do arbitrary processing on the files.'>
                    fileOp: 3
                    with: aCollection
                    with: position + available
-                   with: (position + n - 1 min: aCollection size).
+                   with: (position + n - 1 min: aCollection size)
+                    ifFail: [self checkError].
        count := count + available.
        count = 0 ifTrue: [atEnd := true].
        ^count
@@ -817,7 +819,8 @@ do arbitrary processing on the files.'>
                            fileOp: 2
                            with: aCollection
                            with: cur
-                           with: last.
+                           with: last
+                            ifFail: [self checkError].
                result = 0 ifTrue: [^cur - position].
                cur := cur + result].
        ^cur - position
diff --git a/libgst/prims.def b/libgst/prims.def
index b4ec729..faf8bde 100644
--- a/libgst/prims.def
+++ b/libgst/prims.def
@@ -5869,6 +5869,8 @@ primitive VMpr_FileDescriptor_socketOp [succeed,fail]
 #endif
 
  fail:
+  if (errno)
+    _gst_set_errno (errno);
   PRIM_FAILED;
 
  succeed:
_______________________________________________
help-smalltalk mailing list
help-smalltalk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to