std.process: spawnProcess
Russel Winder
russel at winder.org.uk
Fri Sep 7 16:43:04 UTC 2018
On Fri, 2018-09-07 at 15:53 +0000, Andrea Fontana via Digitalmars-d-learn
wrote:
>
[…]
> void main()
> {
>
> ...
> auto yourpid = spawnProcess(...);
> scope(exit) kill(yourpid, SIGINT); // Or SIGKILL :)
> // Or: scope(exit) wait(yourpid);
> ...
> }
>
Nice thought, but the spawn is deep in the heart of the application, so
scope(exit) isn't feasible.
I am rapidly coming to the conclusion, that I am going to have to use a
registry and apply kill as the last act in main. :-(
--
Russel.
===========================================
Dr Russel Winder t: +44 20 7585 2200
41 Buckmaster Road m: +44 7770 465 077
London SW11 1EN, UK w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20180907/18284d5e/attachment-0001.sig>
More information about the Digitalmars-d-learn
mailing list