Hi Gilles,
thanks for your answer.
That is quite interesting.
I have added your function and placed at call to it directly after
the system() call. Then, everything works fine.
However, a couple of questions come up:
1.) Why does a printf() directly after the system() seems to help aswell?
I do not think, that printf cares about write protection of pages...
2.) I think, I never saw this behaviour with the 2.6.17.* kernel, only with the
2.6.19.1. Is there any difference related to that?
I will doublecheck this.
3) On Jan's PC, the issue never appears, as he has a slower PC.
How can that be related to that?
4.) Could this somehow be handled by Xenomai? Well, adding the function
is - in my eyes - a workaround around the issue, but I expect Xenomai to
do this things for me. It needs a lot of "magic knowledge" to get this
running...
Another approach could be to encapsulate this somehow in the native library
(and in the other libraries) and to document clearly, that fork and related
functions
should not be called out of the realtime task without additional cleanup code.
Anyway, this seems to be the right track!
Regards
Mathias
> > I have stripped down my program that is crashing Xenomai even further.
> > (I have attached the complete source code).
> > No rtnet is required.
> > Now I have the following real time task:
> >
> > static void realtimetask(void *arg)
> > {
> > system("ls -l");
>
> If you want to use system (or any function calling fork, eg popen or
> vfork) with Xenomai, you have to make sure to fault all pages mapped
> with write permission after the fork before trying to use services in
> priimary mode, because fork write protects all pages with write
> permission and notably the threads stacks. A piece of code that faults
> all pages follows.
>
--
Mathias Koehrer
[EMAIL PROTECTED]
Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur 44,85 inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help