rquackenbush / DotNetSigTermTest

Testing responding to SigTerm in a Linux docker container
Apache License 2.0
3 stars 2 forks source link

.NET Core SIGTERM Test

While watching this video from dockercon sf 18, I learned that handling SIGTERM correctly is important in container applications.

This stackoverflow answer had some good information.

This repo tests the above approach in a trivial .NET Core container application. The key is to handle the AppDomain.CurrentDomain.ProcessExit event.