Dmitry Adamushko wrote:
>>when I use fork() instead of vfork() I have the freeze again.
>>I.e. using vfork() it works fine, using fork() freezes the system.
> 
> 
> Gilles: is this not the end point of the fork vs. vfork epopee ? :)

Right. I am currently using linuxthreads pthread implementation, that is
why I had a look at it.

> 
> Anyway, it looks your remarks about fork() make sense. But if it's
> true indeed, a more nicer solution would be required.

The simple solution is to only use fork in non time-critical part of
code (like initializations and cleanup) and to fault the pages after the
fork. It make sense to limit fork use to non time-critical code, I mean,
I would already not recommend to create threads in time-critical code,
creating a process is even worse.

A more complex solution would be to really duplicate the mlocked pages
at fork time.

-- 
                                                 Gilles Chanteperdrix

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to