[Ace-users] Re: [tao-bugs] NamingService Persistency & -ORBDaemon

Sowayan, Abdullah (N-DUA) abdullah.sowayan at lmco.com
Fri Aug 17 21:52:10 CDT 2007


Hi,

> Trying to come up with test cases for your question helped me nailing
> down the problem. Actually, it's a subtle interaction between
-ORBDaemon
> and any file-related option:
> 
> -ORBDaemon seems to set the working directory to / so:

Yes, this is normal and expected when you damonize a process. Please
consult "Advanced Programming in the UNIX Environment" book by Stevens.

If you look at $ACE_ROOT/ace/ACE.h, you'll find the following:

  /**
   * Become a daemon process using the algorithm in Richard Stevens
   * "Advanced Programming in the UNIX Environment."  If
   * @a close_all_handles is non-zero then all open file handles are
   * closed.
   */
  extern ACE_Export int daemonize (
    const ACE_TCHAR pathname[] = ACE_LIB_TEXT ("/"),
    int close_all_handles = ACE_DEFAULT_CLOSE_ALL_HANDLES,
    const ACE_TCHAR program_name[] = ACE_LIB_TEXT ("<unknown>"));

Thanks,
Abdul



More information about the Ace-users mailing list