How kill executables started with spawnShell or executeShell when program finish?
jckj33 at gmail.com
Tue Oct 27 19:45:02 UTC 2020
On Tuesday, 27 October 2020 at 15:16:33 UTC, Marcone wrote:
> Becouse my program use plink.exe running with spawnShell or
> But when my program finish with some crash, or killed with
> windows task manager by user, Plink still running. How can I
> stop all process initialized with spawnShell or executeShell
> when program finish? I another works, how can I make plink.exe
> only lives when program is running?
if you want to close plink.exe when the application that started
it closes by user's request, crash or forceully by the task
manager, WIN32API's JOB functions does that job. I've used that
extensively in C# but I believe you can port that code to D
easily. Here's the code. Hope it's useful.
More information about the Digitalmars-d-learn