question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A way to graceful shutdown a process chain

See original GitHub issue

dotnet run creates 2 processes: (1) dotnet and (2) the app being run. If you kill dotnet the app being run (the exe) is orphaned.

For dotnet watch we need a way to tell the parent process to terminate the child processes before exiting.

Not sure if this should be addressed at the CLI level, or lower…

cc @piotrpMSFT

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
bgribaudocommented, Dec 11, 2019

@muratg

What’s the recommended way of doing this? (Killing a whole process tree, cross platform)

There’s now a Process.Kill() overload for terminating the entire process tree.

1reaction
muratgcommented, Dec 11, 2019

@bgribaudo perfect! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

A way to graceful shutdown a process chain · Issue #5063
Have an API exposed from CLR to kill a process tree; Have the cli create a file or write to std out the...
Read more >
Implementing Graceful Shutdown in Go
Shutting down gracefully is important for any long lasting process, especially for one that handles some kind of state.
Read more >
In what order should I send signals to gracefully shutdown ...
Short Answer: Send SIGTERM , 30 seconds later, SIGKILL . That is, send SIGTERM , wait a bit (it may vary from program...
Read more >
Kubernetes best practices: terminating with grace
Most programs gracefully shut down when receiving a SIGTERM, but if you are using third-party code or are managing a system you don't...
Read more >
Graceful shutdowns on Cloud Run: Deep dive
Learn how to perform various "graceful shutdown" tasks in your application code with Cloud Run.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found