[squeak-dev] How to get rid of instances of ExternalUnixOSProcess
aldeveron at graffiti.net
Tue Feb 3 15:20:08 UTC 2015
> Sent: Tuesday, February 03, 2015 at 6:49 AM
> From: "Herbert König" <herbertkoenig at gmx.net>
> To: "The general-purpose Squeak developers list" <squeak-dev at lists.squeakfoundation.org>
> Subject: [squeak-dev] How to get rid of instances of ExternalUnixOSProcess
> I start external OS processes via the class side method command:
> The returned instances correctly show runState #complete but the
> instances won't get garbage collected.
> Pointer Finder gets me ThisOSProvess allMyChildren.
> I start the external program every few seconds so the instances accumulate.
> So should I manually send unregisterChildProcess: or should I reuse one
> instance of ExternalUnixOSProcess via repeated forkChild to restart the
> program? Or something completely different?
David T. Lewis wrote to the beginners list,
"Just an FYI - I just made some updates to PipeableOSProcess class>>command:
so that it will do a better job of cleaning up pipe handles. You'll still need
to keep an eye out for pipe handle leaks, but expressions like this should now
close all pipes after processing is completed:
(PipeableOSProcess command: '/bin/echo this is a test') output
The updates are in the latest version of CommandShell on SqueakSource."
More information about the Squeak-dev