[squeak-dev] Does PipeableOSProcess require some finalization/clean up?

David T. Lewis lewis at mail.msen.com
Wed May 16 23:47:15 UTC 2012


On Wed, May 16, 2012 at 12:53:26PM -0700, Yoshiki Ohshima wrote:
>   Thank you, Dave!
> 
> I now understand that going through CommandShell was the sanctioned
> way of using PipeableOSProcess.  I'll just modify our code to close it
> explicitly.  (And it seems to work beter.)
> 
> I tried clearing the allMyChildren directory but did not seem to free
> these fds.  I tried:
> 
> PipeableOSProcess allSubInstancesDo: [:e | e closePipes]
> 
> but this do it seems to kill the VM.

Eeek! This should not be happening. PipeableOSProcess>>closePipes uses
StandardFileStream>>primCloseNoError: which does an fclose() to close
the pipe descriptor. This should be failure-proof, but I might be missing
something.

Is this reproduceable? It does not seem to happen on my Linux PC, but
maybe it is an intermittent failure of some kind.

Thanks,
Dave



More information about the Squeak-dev mailing list