dotnet/runtime
Kill(entireProcessTree: true) - cannot terminate self (?)
Chiusa
#85.383 aperta il 26 apr 2023
area-System.Diagnostics.Processhelp wanted
Metriche repository
- Star
- (17.886 stelle)
- Metriche merge PR
- (Merge medio 12g 11h) (661 PR mergiate in 30 g)
Descrizione
This works as expected and terminates application :
Process.GetCurrentProcess().Kill(entireProcessTree: false);
This throws InvalidOperation
Process.GetCurrentProcess().Kill(entireProcessTree: true);
Exception origin here ; https://github.com/dotnet/runtime/blob/10438a57b888cbdc6dc15771dc662adde9fd6b14/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.NonUap.cs#L25

**
Would it be possible to allow also the 'self-termination-with-children' scenario gracefully ?