go-utils
go-utils copied to clipboard
Improve executable.RunWhenKilled semantics
Since RunWhenKilled always calls os.Exit, there's no opportunity for the caller to do anything on shutdown, except in the finalizer. It would be better for it to return an error for callers to be able describe what happened during shutdown, especially if the timeout is hit.