DragonFly commits List (threaded) for 2008-05
DragonFly BSD
DragonFly commits List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/lib/libc/gen pthread_fake.c src/lib/libc_r/uthread Makefile.inc pthread_private.h uthread_atfork.c uthread_fork.c uthread_init.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 May 2008 12:04:59 -0700 (PDT)

:Joerg Sonnenberger wrote:
:> On Mon, May 26, 2008 at 12:53:56AM +0300, Hasso Tepper wrote:
:> > While I tested this pthread_atfork() implementation, I discovered one
:> > problem though. One of pthread_atfork() tests included in Open POSIX
:> > Test Suite [1] fails with it while it works with libthread_xu.
:>
:> Can you describe in short what it is doing?
:
:=46rom the test source:
:
:* This sample test aims to check the following assertion:
:*
:* The function does not return EINTR
:
:* The steps are:
:* -> kill a thread which calls pthread_atfork
:* -> check that EINTR is never returned
:
:With libthread_xu the test outputs:
:
:$ ./3-3.test
:[21:30:40]Test executed successfully.
:[21:30:40]  58840 operations.
:[21:30:40]  98757 signals were sent meanwhile.
:$
:
:With libc_r it remains in infinite loop. You can read the source of the=20
:test in=20
:http://posixtest.cvs.sourceforge.net/posixtest/posixtestsuite/conformance/i=
:nterfaces/pthread_atfork/3-3.c?revision=3D1.1&view=3Dmarkup
:
:=2D-=20
:Hasso
:
:=2D-=20
:Hasso Tepper

    Ah, it took a few minutes but I think the reason it isn't working
    is simply because libc_r does not use real threads.  Because of
    this the other scheduled threads cannot run at all and thus the signal
    is never send, and the while () loops just keeps going off into infinity.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]