Search the web
Sign In
New User? Sign Up
ace-users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[ace-users] Ace_Log_Msg_Unix_Syslog and ACE::daemonize() don't seem   Message List  
Reply | Forward Message #30982 of 42992 |
Re: [ace-users] Ace_Log_Msg_Unix_Syslog and ACE::daemonize() don't seem to work.

Hi,

Thanks for using the PRF.

>> ACE VERSION: 5.2.2
>>
>> HOST MACHINE and OPERATING SYSTEM: SunOS 5.8 Generic_108528-09 sun4u
sparc
>> SUNW,Ultra-80
>> TARGET MACHINE and OPERATING SYSTEM, if different from HOST: Same
>> COMPILER NAME AND VERSION (AND PATCHLEVEL):
>> Reading specs from
>> /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
>> gcc version 2.95.2 19991024 (release)
>>
>> AREA/CLASS/EXAMPLE AFFECTED:
>> [Log_Msg]
>>
>> DOES THE PROBLEM AFFECT:
>> COMPILATION? No
>>
>> LINKING? No
>> EXECUTION? Yes
>>
>> SYNOPSIS:
>> When calling Ace_Log_Msg using the
ACE_Log_Msg::SYSLOG
>> form of open logging
>> ceases to work after calling ACE::daemonize().
>>
>> DESCRIPTION:
>> Example code is attached...if ACE::daemonize() is
>> commented out
>> logging to syslog works as expected. If
ACE::daemonize
>> is called all
>> logging after this call does not appear to go to
>> syslog.

If you check out the source code to ACE::demonize() you'll see that by
default it closes all the I/O handles, including the one to syslog. I
therefore recommend you either

1. Initialize the syslog stuff *after* you daemonize a process or

2. Change the default behavior to not close the handles.

Take care,

Doug
--
Dr. Douglas C. Schmidt, Associate Professor TEL: (949) 824-1901
Dept of Electrical & Computer Engineering FAX: (949) 824-2321
616E Engineering Tower WEB: www.ece.uci.edu/~schmidt/
University of California, Irvine, 92697-2625 NET: schmidt@...



Wed May 15, 2002 5:52 pm

schmidt@...
Send Email Send Email

Forward
Message #30982 of 42992 |
Expand Messages Author Sort by Date

Sorry, forgot to send this before with a pertinent subject line. ACE VERSION: 5.2.2 HOST MACHINE and OPERATING SYSTEM: SunOS 5.8 Generic_108528-09 sun4u sparc ...
BCassanova@...
Send Email
May 15, 2002
5:38 pm

Hi, Thanks for using the PRF. ... If you check out the source code to ACE::demonize() you'll see that by default it closes all the I/O handles, including the...
Douglas C. Schmidt
schmidt@...
Send Email
May 15, 2002
5:53 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help