Results 1 to 3 of 3

Thread: Suggestion to add daemon check to Ice::Service

  1. #1
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123

    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.
    Caleb Tennis
    Analytical Engineering, Inc.
    http://www.aei-tech.com
    Project: Our facility infrastructure heavily utilizes Ice

    Gentoo ebuild maintainer for Ice, IceRuby, etc.

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi Caleb,

    Ice::Service already supports the following method:

    Code:
        //
        // Indicates whether the program is running as a Win32 service or
        // Unix daemon.
        //
        bool service() const;
    Take care,
    - Mark

  3. #3
    ctennis is offline Registered User
    Name: Caleb Tennis
    Organization: AEI
    Project: Project GINA
    Join Date
    Mar 2006
    Posts
    123
    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.
    Caleb Tennis
    Analytical Engineering, Inc.
    http://www.aei-tech.com
    Project: Our facility infrastructure heavily utilizes Ice

    Gentoo ebuild maintainer for Ice, IceRuby, etc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Suggestion: Service/daemon class for .NET
    By kwaclaw in forum Comments
    Replies: 1
    Last Post: 09-04-2007, 08:33 PM
  2. Replies: 0
    Last Post: 05-03-2007, 05:44 AM
  3. Replies: 0
    Last Post: 01-05-2007, 03:19 PM
  4. Replies: 3
    Last Post: 11-15-2004, 09:04 AM
  5. A suggestion for the ICE manual
    By shantanu_k06 in forum Comments
    Replies: 1
    Last Post: 05-13-2004, 08:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •