[squeak-dev] How to get rid of instances of ExternalUnixOSProcess

Herbert König herbertkoenig at gmx.net
Wed Feb 4 10:04:06 UTC 2015


Hi Dave,

  

> All of the child processes that run in your current Squeak session (beginning
> when you start the image) are saved in a dictionary. This is just to make
> them browsable (OSProcess thisOSProcess allMyChildren).
>
> Unregistering each child process, as you suggest above, will work fine, at
> least after fixing the bug that you found (thank you for that, it is updated
> on squeaksource now).
>
> But you can also clean up all of the terminated processes like this:
>
>    OSProcess thisOSProcess discardExitedChildren
>
> Or you can empty the dictionary completely:
>
>    OSProcess thisOSProcess resetChildProcessDictionary

thanks, these helped a lot.

> process every few seconds, maybe for a long time) I can see that it might
> be a real problem. Do you think that this should be changed?

I have been doing embedded with scarce RAM and now I play with home 
automation (in a very broad sense) which is supposed to run 24/7 me 
being abroad and my family not programming.

 From this perspective my immediate instinct is to not collect the 
instances at all.  Now that I know about the fact I prefer to remove 
them myself. But I'm sure other users have a different perspective on 
this and you might break somebody's code if you wouldn't collect them at 
all.

I former uses I collected the processes myself (to kill them, query 
their state) and for that purpose wouldn't want to pick them out of a 
dictionary.

I'm very interested in learning when this dictionary comes in handy or 
is needed because I see many methods referencing allMyChildren but most 
of them are not sent in my image so I can't find out.

Cheers,

Herbert


More information about the Squeak-dev mailing list