2007/4/27, Jan Kiszka <[EMAIL PROTECTED]>:
>
> I mean I know that uninitialized memory have unpredictable consequence
> but here the bug is persistent after rerun, reboot, power cycle etc...
>
What is a.sa_flags initialised when it is not initialised? 0? Maybe you
can nail it down to defined state that causes the core dump reliably.
Then we can also track down what happens to your sigaction call and
if/why Xenomai/I-pipe changes the picture in some regard.
I did rerun as you suggest, find the code attached which
consistentely core dump with xenomai kernel and (seems to) do nothing
special with the other kernel.
a.sa_flags = 0xbff81578;
--
Erk
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
static int stop = 0;
void
SignalHandler(int Signal) {
int pid = getpid();
printf("Received signal %d. Stopping peacefully.\n", Signal);
stop = 1;
}
int
main() {
int i;
struct sigaction a ;
signal(SIGINT , SignalHandler);
signal(SIGPIPE, SignalHandler);
a.sa_handler = SignalHandler ;
sigemptyset(&a.sa_mask);
#if defined(GOOD_SIGHANDLING)
a.sa_flags = SA_RESTART;
#else
a.sa_flags = 0xbff81578;
#endif
sigaction(SIGALRM, &a, NULL);
alarm(3);
for (i=0;i<2000 && !stop ;++i) {
printf(".");
fflush(stdout);
sleep(1);
}
}
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help