This forum has been archived. Please start a new discussion on GitHub.

Suggestion to add daemon check to Ice::Service

I have an Ice::Service that will run in the background (using the --daemon option) most of the time. I use the logger functions to send the output to a backend system.

However, sometimes it's nice if there's an issue to run the process in the foreground and use STDOUT as a quick debug of what's going on.

So, this is a suggestion to perhaps add a method that returns a boolean that specifies whether the service was started in the foreground or background. That way, the program can act differently at startup if it knows it will be running in the foreground.

I would suggest something like "isDaemon()" but I know that doesn't fit in well on the Windows side of things.

Thanks for the consideration.


  • mes
    mes California
    Hi Caleb,

    Ice::Service already supports the following method:
        // Indicates whether the program is running as a Win32 service or
        // Unix daemon.
        bool service() const;
    Take care,
    - Mark
  • Holy cow, how did I miss that? it suppose it comes from staring at that book for too long. Too much information :)

    Thanks, and sorry for the noise.