OSProcess: making sure that a child process always dies

David T. Lewis lewis at mail.msen.com
Thu Mar 15 11:58:07 UTC 2007


On Thu, Mar 15, 2007 at 12:15:01AM -0700, Joshua Gargus wrote:
> Hi,
> 
> Is there a way to use OSProcess on OS X (or unix in general) to cause  
> forked child processes to die when the parent Squeak process quits?

You can keep track of the process proxy for the forked child
process, and explicitly terminate it when you exit Squeak, possibly
as part of a class #shutDown: method.

For example, you can kill all child processes like this:
  OSProcess thisOSProcess allMyChildren do: [:e | e terminate]

Dave




More information about the Squeak-dev mailing list