[squeak-dev] How to find unclosed file handles in Squeak?
karl ramberg
karlramberg at gmail.com
Thu Oct 1 19:38:52 UTC 2020
Stream allSubInstances ?
Best,
Karl
On Thu, Oct 1, 2020 at 9:13 PM Thiede, Christoph <
Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> 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/a329488d/attachment.html>
More information about the Squeak-dev
mailing list
|