Go Back   ZeroC Forums > Comments

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-29-2006
ctennis ctennis is offline
Registered User
 
Name: Caleb Tennis
Organization: AEI
Project: Project GINA
 
Join Date: Mar 2006
Posts: 120
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.
Reply With Quote
  #2 (permalink)  
Old 03-29-2006
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: 971
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
Reply With Quote
  #3 (permalink)  
Old 03-29-2006
ctennis ctennis is offline
Registered User
 
Name: Caleb Tennis
Organization: AEI
Project: Project GINA
 
Join Date: Mar 2006
Posts: 120
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash if running Ice::Service as daemon & ulimit -n > FD_SETSIZE svens Patches 0 01-05-2007 04:19 PM
Documentation suggestion mwilson Comments 0 04-12-2006 05:20 PM
Can Ice dynamically check and update its registry infomation when a Ice server dies? rc_hz Help Center 3 11-15-2004 10:04 AM
return value of pthread_mutex_trylock() not check properly stefan Bug Reports 5 05-29-2004 10:18 AM
suggestion 1 xiehua Comments 0 11-22-2003 09:53 PM


All times are GMT -4. The time now is 07:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.