[squeak-dev] How to find unclosed file handles in Squeak?
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Oct 1 19:13:27 UTC 2020
Simple question, probably we already have a helper method for it, but I did not found any yet:
Often, way too often, I encounter some old code (or some stupid code written by myself) that uses #readStream to read a file and forgets to close it again.
Apart from the fact that #readStream is a quite dangerous selector, I wish I could find these unclosed file streams and close them manually without restarting my entire image.
Is there any quick way to do this? "Smalltalk snapshot: false andQuit: false" does not seem to do the trick, and I would prefer a less brutal approach.
Something like "Utilities exploreUnclosedFileStreams" would be perfect ...
Best,
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201001/0ac1c8d8/attachment.html>
More information about the Squeak-dev
mailing list
|