std.process: spawnProcess

FreeSlave freeslave93 at gmail.com
Sat Sep 8 10:24:13 UTC 2018


On Friday, 7 September 2018 at 14:36:42 UTC, Russel Winder wrote:
> From what I can see, processes created with std.process: 
> spawnProcess are not terminated when the creating process 
> terminates, i.e. it seems Config.detached is the default for 
> these process.

No, detached is not default. By default you should call wait on 
processes to free OS resources. Process may stay as zombie 
otherwise and it can be visible in process manager.

> Is there a way of all spawned processes being terminated on 
> main termination?

You probably need to register all child processes. Or spawn them 
as detached so you won't need to worry about freeing them.


More information about the Digitalmars-d-learn mailing list