now listening to Unix Signals to exit gracefully#7
Open
mkobaly wants to merge 2 commits intopruiz:masterfrom
Open
now listening to Unix Signals to exit gracefully#7mkobaly wants to merge 2 commits intopruiz:masterfrom
mkobaly wants to merge 2 commits intopruiz:masterfrom
Conversation
When running a mono application using docker the container and trying to stop the container it would take a while to exit and return with a non zero exit code.
| // Needed to overcome mono-service style arguments. | ||
| configurator.ApplyCommandLine(MonoHelper.GetUnparsedCommandLine()); | ||
| configurator.UseEnvironmentBuilder((cfg) => new LinuxHostEnvironmentBuilder(cfg)); | ||
| configurator.UseHostBuilder((environment, settings) => new LinuxRunBuilder(environment, settings)); |
Owner
There was a problem hiding this comment.
Please, try to respect current spacing/tabs setup.
Author
|
I will update the pull request. |
| // Needed to overcome mono-service style arguments. | ||
| configurator.ApplyCommandLine(MonoHelper.GetUnparsedCommandLine()); | ||
| configurator.UseEnvironmentBuilder((cfg) => new LinuxHostEnvironmentBuilder(cfg)); | ||
| configurator.UseHostBuilder((environment, settings) => new LinuxRunBuilder(environment, settings)); |
Owner
There was a problem hiding this comment.
From what I see, this will break those cases when the service is running under "mono-service" (as those are not intended to run under ConsoleRunHost.
AFAIK, you should modify LinuxHostEnvironment::CreateServiceHost(..) in order to instantiate a this new LinuxConsoleRunHost, instead of forcing a new builder to override the host everytime.
Owner
There was a problem hiding this comment.
I maybe wrong.. at least from inspecting https://github.com/Topshelf/Topshelf/blob/0eec82de0140192d54daddc18f3e1f7fbeb4ba00/src/Topshelf/Configuration/Builders/RunBuilder.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running a mono application using docker the container and trying to stop the container it would take a while to exit and return with a non zero exit code.
LinuxConsoleRunHost is a copy of ConsoleRunHost from Topshelf with the UnixSignal support.
LinuxRunBuilder is copy of RunBuilder from Topshelf where the LinuxConsoleRunHost is used.