[M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4

Jay K jay.krell at cornell.edu
Tue Apr 19 01:26:26 CEST 2011


> The following code from RTProcessC.c ensures that it is neeeded on every Unix except
> > /* NOTE: Even userthreads now depends
> > * on availability of pthreads.
> > * This can be fixed if need be.
> > */

 
Ok, "we" should probably go ahead and fix that.
I'll try to, but no promises, sorry.
 
 - Jay
 
> From: hosking at cs.purdue.edu
> Date: Mon, 18 Apr 2011 18:11:26 -0400
> To: mika at async.caltech.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4
> 
> Probably unnecessary, given that I think there is another entry point to forking a process (I forget where) in the thread-specific portion of m3core. In which case the necessary work might be done there?
> 
> On Apr 18, 2011, at 2:45 PM, Mika Nystrom wrote:
> 
> > Tony Hosking writes:
> > ...
> >> pthread_atfork should not be needed under user threads.
> > ...
> > 
> > The following code from RTProcessC.c ensures that it is neeeded on every Unix except
> > FreeBSD before 6. The comment is from the checked-in source file.
> > 
> > /* NOTE: Even userthreads now depends
> > * on availability of pthreads.
> > * This can be fixed if need be.
> > */
> > 
> > INTEGER
> > __cdecl
> > RTProcess__RegisterForkHandlers(
> > ForkHandler prepare,
> > ForkHandler parent,
> > ForkHandler child)
> > {
> > /* FreeBSD < 6 lacks pthread_atfork. Would be good to use autoconf.
> > * VMS lacks pthread_atfork? Would be good to use autoconf.
> > * Win32 lacks pthread_atfork and fork. OK.
> > *
> > * As well, for all Posix systems, we could implement
> > * atfork ourselves, as long as we provide a fork()
> > * wrapper that code uses.
> > */
> > #if defined(_WIN32) \
> > || defined(__vms) \
> > || (defined(__FreeBSD__) /* && (__FreeBSD__ < 6)*/ )
> > return 0;
> > #else
> > while (1)
> > {
> > int i = pthread_atfork(prepare, parent, child);
> > if (i != EAGAIN)
> > return i;
> > sleep(0);
> > }
> > #endif
> > }
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110418/0287e72c/attachment-0002.html>


More information about the M3devel mailing list