On 22/12/06, M. Koehrer <[EMAIL PROTECTED]> wrote:
Hi Gilles,
> fault_vm is safe to use only if you are calling fork at a time when
> there is only one thread. So, if your application is forking at init, it
> should be OK.
Do you mean there must be only one real time thread?
That means, when I have an application that creates multiple real time threads,
I can not rely on fault_vm() ?
Yes, read my previous mail.
In this case I have to do the "hard" way by using a different (non real time)
context to do the forks and system() calls.
That's much safer indeed. Both in respect of this particular problem
and others that may be encountered using fork() from a multithreaded
application.
e.g. look here
http://www.gnu.org/software/libc/manual/html_node/Threads-and-Fork.html#Threads%20and%20Fork
As this is hard to understand, I strongly recommend that there is Xenomai
support
for this! I.e. a Xenomai API that can be called with a (callback-)function
pointer and
a user data pointer.
When a (realtime) thread calls this function, the real time thread is blocked.
The callback function is then called from a safe context and
after exit of the callback function the real time thread is resumed.
I haven't got your idea. Did you get the cause of the problem with fork() ?
Regards
Mathias
--
Best regards,
Dmitry Adamushko
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help