Luiz Costa
|
forking of a process with threads
|
Luiz Costa
06/28/2010 6:06 PM
post58015
|
forking of a process with threads
I read in Rob Krten's "Getting Started with QNX Neutrino: A Guide for Realtime Programmers" Oct 20, 2008, page 35, that
forking of a process with threads was not allowed because of mutex ownership issues. However, he thought in the future
that may change. In that book, Rob also noted that pthreat_atfork() includes a solution to that mutex issue, but that "
the functionality of calling pthread_atfork() isn't being used by all the mutexes in the Neutrino C library ..."
Does anyone know about a change to the above and, if so, of an article that explains of the current situation of forking
off from processes with threads?
I humbly await a SIGTIP,
Luiz
PS.: If you don't mind, please, CC me to costal@ferris.edu.
|
|
|
Sean Boudreau(deleted)
|
RE: forking of a process with threads
|
Sean Boudreau(deleted)
06/28/2010 8:46 PM
post58018
|
RE: forking of a process with threads
> Does anyone know about a change to the above and, if so, of an article that explains of the current situation of
forking off from processes with threads?
It's in progress. It should be in 6.6.
Regards,
-seanb
|
|
|
Neil Schellenberger(deleted)
|
Re: forking of a process with threads
|
Neil Schellenberger(deleted)
06/29/2010 10:12 AM
post58064
|
Re: forking of a process with threads
On Mon, 2010-06-28 at 18:06 -0400, Luiz Costa wrote:
> I read in Rob Krten's "Getting Started with QNX Neutrino: A Guide for
> Realtime Programmers" Oct 20, 2008, page 35, that forking of a process
> with threads was not allowed because of mutex ownership issues.
> However, he thought in the future that may change. In that book, Rob
> also noted that pthreat_atfork() includes a solution to that mutex
> issue, but that "the functionality of calling pthread_atfork() isn't
> being used by all the mutexes in the Neutrino C library ..."
>
> Does anyone know about a change to the above and, if so, of an article
> that explains of the current situation of forking off from processes
> with threads?
The upcoming 6.5.0 release includes a libc with support for forking in
the presence of threads. Note that only libc has had atfork handlers
added: no analysis has yet been done on the broader array of libraries.
If you're lucky, they'll just work =)
Regards,
Neil
|
|
|
Sean Boudreau(deleted)
|
Re: forking of a process with threads
|
Sean Boudreau(deleted)
06/29/2010 10:15 AM
post58067
|
Re: forking of a process with threads
On Tue, Jun 29, 2010 at 10:12:27AM -0400, Neil Schellenberger wrote:
> On Mon, 2010-06-28 at 18:06 -0400, Luiz Costa wrote:
> > I read in Rob Krten's "Getting Started with QNX Neutrino: A Guide for
> > Realtime Programmers" Oct 20, 2008, page 35, that forking of a process
> > with threads was not allowed because of mutex ownership issues.
> > However, he thought in the future that may change. In that book, Rob
> > also noted that pthreat_atfork() includes a solution to that mutex
> > issue, but that "the functionality of calling pthread_atfork() isn't
> > being used by all the mutexes in the Neutrino C library ..."
> >
> > Does anyone know about a change to the above and, if so, of an article
> > that explains of the current situation of forking off from processes
> > with threads?
>
> The upcoming 6.5.0 release includes a libc with support for forking in
> the presence of threads. Note that only libc has had atfork handlers
> added: no analysis has yet been done on the broader array of libraries.
> If you're lucky, they'll just work =)
>
Actually, it's about half done. We haven't flipped the switch
in fork.c :)
-seanb
|
|
|
Neil Schellenberger(deleted)
|
Re: forking of a process with threads
|
Neil Schellenberger(deleted)
06/29/2010 10:26 AM
post58072
|
Re: forking of a process with threads
On Tue, 2010-06-29 at 10:15 -0400, Sean Boudreau wrote:
> Actually, it's about half done. We haven't flipped the switch
> in fork.c :)
Oops. My mistake =) I thought that we had already flipped it.
|
|
|
Colin Burgess(deleted)
|
Re: forking of a process with threads
|
Colin Burgess(deleted)
06/29/2010 10:29 AM
post58075
|
Re: forking of a process with threads
That's because there is procnto work to be done yet - a forked process
does not get it's mutexes copied over
yet.
On 10-06-29 10:15 AM, Sean Boudreau wrote:
> On Tue, Jun 29, 2010 at 10:12:27AM -0400, Neil Schellenberger wrote:
>
>> On Mon, 2010-06-28 at 18:06 -0400, Luiz Costa wrote:
>>
>>> I read in Rob Krten's "Getting Started with QNX Neutrino: A Guide for
>>> Realtime Programmers" Oct 20, 2008, page 35, that forking of a process
>>> with threads was not allowed because of mutex ownership issues.
>>> However, he thought in the future that may change. In that book, Rob
>>> also noted that pthreat_atfork() includes a solution to that mutex
>>> issue, but that "the functionality of calling pthread_atfork() isn't
>>> being used by all the mutexes in the Neutrino C library ..."
>>>
>>> Does anyone know about a change to the above and, if so, of an article
>>> that explains of the current situation of forking off from processes
>>> with threads?
>>>
>> The upcoming 6.5.0 release includes a libc with support for forking in
>> the presence of threads. Note that only libc has had atfork handlers
>> added: no analysis has yet been done on the broader array of libraries.
>> If you're lucky, they'll just work =)
>>
>>
> Actually, it's about half done. We haven't flipped the switch
> in fork.c :)
>
> -seanb
>
>
>
> _______________________________________________
>
> OSMeta
> http://community.qnx.com/sf/go/post58067
>
>
--
cburgess@qnx.com
|
|
|
Neil Schellenberger(deleted)
|
Re: forking of a process with threads
|
Neil Schellenberger(deleted)
06/29/2010 10:36 AM
post58080
|
Re: forking of a process with threads
On Tue, 2010-06-29 at 10:29 -0400, Colin Burgess wrote:
> That's because there is procnto work to be done yet - a forked process
> does not get it's mutexes copied over
> yet.
Again, my apologies. I thought that had made it in for 6.5.0. I'll
crawl back under my rock now....
|
|
|
|