#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Fri, 14 Oct 2016 13:44:57 +0200
changeset 20644 c2b4ab689f0d
parent 20643 cdc2a4259d4d
child 20645 51353c4d390c
#BUGFIX by stefan class: NonPositionableExternalStream added: #close deregister file descriptors marked for select
NonPositionableExternalStream.st
--- a/NonPositionableExternalStream.st	Fri Oct 14 13:43:10 2016 +0200
+++ b/NonPositionableExternalStream.st	Fri Oct 14 13:44:57 2016 +0200
@@ -206,6 +206,25 @@
     ].
 ! !
 
+!NonPositionableExternalStream methodsFor:'closing'!
+
+close
+    "Close the stream.
+     No error if the stream is not open."
+
+    |semasToSignal|
+
+    self isOpen ifTrue:[
+        "make sure, that no select is performed on closed file descriptors"
+        semasToSignal := Processor disableFd:self fileHandle doSignal:false.
+        super close.
+        "tell the waiters that they must not wait any longer"
+        semasToSignal do:[:eachSema|
+            eachSema signalForAll.
+        ].
+    ].
+! !
+
 !NonPositionableExternalStream methodsFor:'error handling'!
 
 positionError