All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Printf stops working after receiving signal.
@ 2009-09-24 19:25 Steve Deiters
  2009-09-24 19:43 ` Gilles Chanteperdrix
  2009-09-24 19:48 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 7+ messages in thread
From: Steve Deiters @ 2009-09-24 19:25 UTC (permalink / raw)
  To: xenomai

I have a simple little test program, attached below.  When I hit CTL-C
to break the program, not all of the "finished" lines will print.  If I
remove either the rt_task_shadow call or the sigwait at the end, it will
then print all of them.  Adding a fflush(stdout) to the end does nothing
to help it.

I'm not sure if there's some interaction with the Xenomai domain I am
just missing which is causing the print statements to be dropped.

This is running on a PowerPC kernel 2.6.24 with Xenoami 2.4.9.

----------------------------------------------------- 
#include <signal.h>
#include <stdio.h>
#include <native/task.h>

static volatile int signaled = 0;

static void catch(int x)
{
   signaled = 1;
}

static RT_TASK rt_main;

int main(int argc, char **argv)
{
   int sig;
   struct sigaction act;
   sigset_t set;
   rt_task_shadow(&rt_main, NULL, 99, 0);

   act.sa_flags = 0;
   act.sa_handler = catch;
   sigemptyset(&act.sa_mask);
   sigaction(SIGINT,&act,NULL);

   printf("starting 1\n");
   printf("starting 2\n");
   printf("starting 3\n");
   printf("starting 4\n");
   printf("starting 5\n");

   while(!signaled)
   {
      sleep(1);
      printf(".");
      fflush(stdout);
   }

   printf("\nfinished 1\n");
   printf("finished 2\n");
   printf("finished 3\n");
   printf("finished 4\n");
   printf("finished 5\n");

   sigfillset(&set);
   sigwait(&set,&sig);

   return 0;
}


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Printf stops working after receiving signal.
  2009-09-24 19:25 [Xenomai-help] Printf stops working after receiving signal Steve Deiters
@ 2009-09-24 19:43 ` Gilles Chanteperdrix
  2009-09-24 19:48 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-09-24 19:43 UTC (permalink / raw)
  To: Steve Deiters; +Cc: xenomai

Steve Deiters wrote:
> I have a simple little test program, attached below.  When I hit CTL-C
> to break the program, not all of the "finished" lines will print.  If I
> remove either the rt_task_shadow call or the sigwait at the end, it will
> then print all of them.  Adding a fflush(stdout) to the end does nothing
> to help it.
> 
> I'm not sure if there's some interaction with the Xenomai domain I am
> just missing which is causing the print statements to be dropped.
> 
> This is running on a PowerPC kernel 2.6.24 with Xenoami 2.4.9.

Do not know if this is related, but sigwait is only guaranteed to work
if you wait for signals that are currently masked.


-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Printf stops working after receiving signal.
  2009-09-24 19:25 [Xenomai-help] Printf stops working after receiving signal Steve Deiters
  2009-09-24 19:43 ` Gilles Chanteperdrix
@ 2009-09-24 19:48 ` Gilles Chanteperdrix
  2009-09-24 23:10   ` Steve Deiters
  1 sibling, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-09-24 19:48 UTC (permalink / raw)
  To: Steve Deiters; +Cc: xenomai

Steve Deiters wrote:
> I have a simple little test program, attached below.  When I hit CTL-C
> to break the program, not all of the "finished" lines will print.  If I
> remove either the rt_task_shadow call or the sigwait at the end, it will
> then print all of them.  Adding a fflush(stdout) to the end does nothing
> to help it.
> 
> I'm not sure if there's some interaction with the Xenomai domain I am
> just missing which is causing the print statements to be dropped.
> 
> This is running on a PowerPC kernel 2.6.24 with Xenoami 2.4.9.

Xenomai 2.4.9 has no I-pipe patch for Linux 2.6.24 for PowerPC. And you
should be using Xenomai 2.4.9.1 and one of the patches it contains.
Earlier patches and earlier revisions are buggy.


-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Printf stops working after receiving signal.
  2009-09-24 19:48 ` Gilles Chanteperdrix
@ 2009-09-24 23:10   ` Steve Deiters
  2009-09-25  7:26     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Deiters @ 2009-09-24 23:10 UTC (permalink / raw)
  To: xenomai

I upgraded to Xenomai 2.4.9.1 and get the same behavior.  Any other
ideas as to what may be causing this?

Thanks.



-----Original Message-----
From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Sent: Thursday, September 24, 2009 2:49 PM
To: Steve Deiters
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Printf stops working after receiving signal.

Steve Deiters wrote:
> I have a simple little test program, attached below.  When I hit CTL-C

> to break the program, not all of the "finished" lines will print.  If 
> I remove either the rt_task_shadow call or the sigwait at the end, it 
> will then print all of them.  Adding a fflush(stdout) to the end does 
> nothing to help it.
> 
> I'm not sure if there's some interaction with the Xenomai domain I am 
> just missing which is causing the print statements to be dropped.
> 
> This is running on a PowerPC kernel 2.6.24 with Xenoami 2.4.9.

Xenomai 2.4.9 has no I-pipe patch for Linux 2.6.24 for PowerPC. And you
should be using Xenomai 2.4.9.1 and one of the patches it contains.
Earlier patches and earlier revisions are buggy.


-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Printf stops working after receiving signal.
  2009-09-24 23:10   ` Steve Deiters
@ 2009-09-25  7:26     ` Gilles Chanteperdrix
  2009-09-25 14:33       ` Steve Deiters
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-09-25  7:26 UTC (permalink / raw)
  To: Steve Deiters; +Cc: xenomai

Steve Deiters wrote:
> I upgraded to Xenomai 2.4.9.1 and get the same behavior.  Any other
> ideas as to what may be causing this?

With one of the I-pipe patches which comes with Xenomai 2.4.9.1 ?

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Printf stops working after receiving signal.
  2009-09-25  7:26     ` Gilles Chanteperdrix
@ 2009-09-25 14:33       ` Steve Deiters
  2009-09-25 15:05         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Deiters @ 2009-09-25 14:33 UTC (permalink / raw)
  To: xenomai

This is the name of the patch from the Xenomai source package it
installs: adeos-ipipe-2.6.24.6-powerpc-DENX-2.4-03.patch.

I checked the adeos download site
(http://download.gna.org/adeos/patches/v2.6/powerpc/older/) and there is
no newer one listed for this version of the kernel.


-----Original Message-----
From: xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid]
On Behalf Of Gilles Chanteperdrix
Sent: Friday, September 25, 2009 2:26 AM
To: Steve Deiters
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Printf stops working after receiving signal.

Steve Deiters wrote:
> I upgraded to Xenomai 2.4.9.1 and get the same behavior.  Any other 
> ideas as to what may be causing this?

With one of the I-pipe patches which comes with Xenomai 2.4.9.1 ?

-- 
					    Gilles.

_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Printf stops working after receiving signal.
  2009-09-25 14:33       ` Steve Deiters
@ 2009-09-25 15:05         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2009-09-25 15:05 UTC (permalink / raw)
  To: Steve Deiters; +Cc: xenomai

Steve Deiters wrote:
> This is the name of the patch from the Xenomai source package it
> installs: adeos-ipipe-2.6.24.6-powerpc-DENX-2.4-03.patch.
> 
> I checked the adeos download site
> (http://download.gna.org/adeos/patches/v2.6/powerpc/older/) and there is
> no newer one listed for this version of the kernel.

Ok. I did not know that a patch for this version of the kernel was
included in xenomai 2.4.9.1. But it is seems to have the bug that was
fixed in later releases. Anyway, I will let Philippe answer you from there.

-- 
                                          Gilles



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-25 15:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-24 19:25 [Xenomai-help] Printf stops working after receiving signal Steve Deiters
2009-09-24 19:43 ` Gilles Chanteperdrix
2009-09-24 19:48 ` Gilles Chanteperdrix
2009-09-24 23:10   ` Steve Deiters
2009-09-25  7:26     ` Gilles Chanteperdrix
2009-09-25 14:33       ` Steve Deiters
2009-09-25 15:05         ` Gilles Chanteperdrix

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.