rt_printf with daemonized task
-------- Original Message --------
Subject: Re: Re-8: [Xenomai-help] rt_printf with daemonized task (07-Okt-2009 17:24) From: Gilles Chanteperdrix <[email protected]> To: [email protected]
Quoted 53 lines
Quoted 52 lines · [email protected] wrote:
As you expected, changing the syslog call from
syslog( LOG_ERR | LOG_LOCAL4, head->text ); to syslog( LOG_ERR | LOG_LOCAL4, "%s", head->text );did not change anything.
To track down the problem further, I have made a small test application :
#include <
stdlib.h>
#include <stdio.h>#include <
native/task.h>
#include <native/timer.h>
#include <rtdk.h>int
main( int arc, char *argv[] )
{
int i;
rt_print_auto_init(1);
rt_printf("--------------- TEST RT-PRINTF 1 ------------\n");sleep(1);
daemon(0,0);rt_print_auto_init(1); rt_printf("--------------- TEST RT-PRINTF 2 ------------\n"); sleep(10);return(0);
}This application gives the following results :
- If thedaemon()function is not called, allrt_printf()do work well and output is shown in syslog
- Ifdaemon()function is called, and first call to sleep(1) is omitted, there is no output in the syslog whatsoever.
- Ifdaemon()function is called, and first call to sleep(1) is executed, there is output of the firstrt_printfin the syslog but not of the
second
one.
Quoted 4 lines
Quoted 2 lines
I do not have any idea why daemonizing of the process is not giving any output to the syslog.
Could you try
daemon(0, 1)?
No change.
Quoted 1 line
First of all, I would like to apologize for the inconvenience I put on you. I wasn't aware of this situation.
Quoted 2 lines
Could you also try to send normal replies to our replies, not mails which do not appear as replies and start new threads?
Hopefully with this mail it did change. If not please let me know what to do.
Quoted 3 lines
Could you also remove the annoying feature that ask me to confirm that I want you to be notified that I read your mail?
Feature should now be turned off, please let me also know, if not.
Quoted 4 lines
Signature · 2 lines
-- Gilles
Oliver