All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: oliver.schlenker@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rt_printf with daemonized task
Date: Tue, 06 Oct 2009 17:16:50 +0200	[thread overview]
Message-ID: <4ACB5F62.5050609@domain.hid> (raw)
In-Reply-To: <DIIE.000001AF0000AC52@domain.hid>

oliver.schlenker@domain.hid wrote:
> 
> 
> Hi,
> 
> we are using a xenomai system with kernel 2.6.22 and xenomai 2.4.7.
> 
> There is some strange behaviour when using rt_printf in one of our
> application. The application is setup as a server process, which itself
> is setting up several xenomai tasks. 
> All rt_printf outputs are displayed correctly as long as the server process is not daemonized. 
> 
> If the server process is daemonized with code like
> 
> if( (pid=fork()) < 0 )
> {
>         return(-1);
> }else
> {
>         if( pid != 0 )
>         {
>             exit(0);
>         }
> }

This is over-simplified. You process is not really daemonized. You
should really call the glibc daemon() function.

> 
> all rt_printf-output is printed only when the server process exits
> and not during the time the server process is running.
> 
> 
> Any idea ?

I guess you do not need rt_printf output in the parent. So, you should
try and initialize the rt_printf library only in the child.

-- 
                                          Gilles



  reply	other threads:[~2009-10-06 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 15:10 [Xenomai-help] rt_printf with daemonized task oliver.schlenker
2009-10-06 15:16 ` Gilles Chanteperdrix [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-10-08  7:15 oliver.schlenker
2009-10-08 12:01 [Xenomai-help] :: " oliver.schlenker
2009-10-08 13:17 ` Jan Kiszka
2009-10-09 13:34 oliver.schlenker
2009-10-09 13:49 ` Gilles Chanteperdrix
2009-10-09 13:58 ` Jan Kiszka
2009-10-09 13:54 oliver.schlenker
2009-10-09 14:48 oliver.schlenker
2009-10-09 14:59 ` Jan Kiszka
2009-10-19 13:12 oliver.schlenker
2009-10-19 14:00 ` Jan Kiszka
2009-10-19 13:14 oliver.schlenker
2009-10-19 14:00 ` Jan Kiszka
2009-10-20  9:26 oliver.schlenker
2009-10-20  9:33 ` Jan Kiszka
2009-10-20 10:03 oliver.schlenker
2009-10-20 16:01 ` Gilles Chanteperdrix
2009-10-20 16:07   ` Jan Kiszka
2009-10-20 16:11 ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACB5F62.5050609@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=oliver.schlenker@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.