Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TopShelf Exit Code Guidance #1

Open
robdmoore opened this issue Dec 27, 2013 · 0 comments
Open

TopShelf Exit Code Guidance #1

robdmoore opened this issue Dec 27, 2013 · 0 comments

Comments

@robdmoore
Copy link
Member

We should remember to publish guidance about making the exit code from the topshelf app right be returning, in fact I had this:

    private static readonly TopshelfExitCode[] OkStatuses = new[]
    {
        TopshelfExitCode.Ok, TopshelfExitCode.ServiceAlreadyInstalled, TopshelfExitCode.ServiceAlreadyRunning, TopshelfExitCode.ServiceNotInstalled
    };

...

    static int Main()
    {
        ...
        var exitCode = HostFactory.Run(x =>
        {
            ...
        };

        return OkStatuses.Contains(exitCode)
            ? 0
            : (int)exitCode;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant