#BUGFIX by stefan
class: ExternalStream
docu changed: #closeFile
move #finalizationLobby to the class protocol where it belongs to
--- a/ExternalStream.st Fri Nov 18 12:59:32 2016 +0100
+++ b/ExternalStream.st Fri Nov 18 14:57:52 2016 +0100
@@ -1892,6 +1892,15 @@
^ false
! !
+!ExternalStream class methodsFor:'finalization'!
+
+finalizationLobby
+ "answer the registry used for finalization.
+ ExternalStreams have their own Registry"
+
+ ^ Lobby
+! !
+
!ExternalStream class methodsFor:'obsolete'!
makePTYPair
@@ -2514,13 +2523,6 @@
^ self class basicNew setAccessor:handleType to:handle
!
-finalizationLobby
- "answer the registry used for finalization.
- ExternalStreams have their own Registry"
-
- ^ Lobby
-!
-
finalize
"some Stream has been collected - close the file if not already done"
@@ -4670,9 +4672,7 @@
clearEOF
hitEOF := false
-! !
-
-!ExternalStream protectedMethodsFor:'private'!
+!
closeFile
"low level close - may be redefined in subclasses
@@ -4735,14 +4735,14 @@
// cg: the pre Nov2014 code always did the fclose interruptable;
// I am not sure, if fclose is actually prepared to do this;
// at least when only reading, this should not block, and we
- // should be ableto do it without being interruptable.
+ // should be able to do it without being interruptable.
// Must watch this - if it leads to blockings, change and think about it.
- if (__INST(mode) != @symbol(readonly)) {
+ if (__INST(mode) == @symbol(readonly)) {
+ rslt = fclose(f);
+ } else {
__BEGIN_INTERRUPTABLE__
rslt = fclose(f);
__END_INTERRUPTABLE__
- } else {
- rslt = fclose(f);
}
#endif
} else {
@@ -4780,9 +4780,7 @@
handle := nil.
self closeFile:fp
]
-! !
-
-!ExternalStream methodsFor:'private'!
+!
closeFile:handle
"for rel5 only"