[squeak-dev] All mczs have disappeared from source.squeak.org

Tobias Pape Das.Linux at gmx.de
Sat Oct 8 17:51:33 UTC 2022


Hi

> On 8. Oct 2022, at 19:31, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> On Sat, Oct 08, 2022 at 05:17:09PM +0200, Tobias Pape wrote:
>> 
[…]
>> Also why not simply reading the file? Like with filestream???
>> 
>> Best regards
>> 	-Tobias
>> 
> 
> Good question. It does not seem to work as expected, apparently
> because primitiveFileSize answers 0 for this kind of file.
> 
> But here is a workaround that seems to get the job done:
> 
> | fs |
> [[fs := FileStream readOnlyFileNamed: '/proc/meminfo'.
> fs next: 100000]
> 	on: Error do: ['']]
> 		ensure: [ fs ifNotNil: [fs close]].
> 

Hm i wonder what cat is doing differntly…
but this way above, we're not leaking FDs…

-t


More information about the Squeak-dev mailing list