<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
> The following code from RTProcessC.c ensures that it is neeeded on every Unix except<BR>> > /* NOTE: Even userthreads now depends<BR>> > * on availability of pthreads.<BR>> > * This can be fixed if need be.<BR>> > */<BR><BR>
<BR>
Ok, "we" should probably go ahead and fix that.<BR>
I'll try to, but no promises, sorry.<BR>
<BR>
- Jay<BR> <BR>
> From: hosking@cs.purdue.edu<BR>> Date: Mon, 18 Apr 2011 18:11:26 -0400<BR>> To: mika@async.caltech.edu<BR>> CC: m3devel@elegosoft.com<BR>> Subject: Re: [M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4<BR>> <BR>> 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?<BR>> <BR>> On Apr 18, 2011, at 2:45 PM, Mika Nystrom wrote:<BR>> <BR>> > Tony Hosking writes:<BR>> > ...<BR>> >> pthread_atfork should not be needed under user threads.<BR>> > ...<BR>> > <BR>> > The following code from RTProcessC.c ensures that it is neeeded on every Unix except<BR>> > FreeBSD before 6. The comment is from the checked-in source file.<BR>> > <BR>> > /* NOTE: Even userthreads now depends<BR>> > * on availability of pthreads.<BR>> > * This can be fixed if need be.<BR>> > */<BR>> > <BR>> > INTEGER<BR>> > __cdecl<BR>> > RTProcess__RegisterForkHandlers(<BR>> > ForkHandler prepare,<BR>> > ForkHandler parent,<BR>> > ForkHandler child)<BR>> > {<BR>> > /* FreeBSD < 6 lacks pthread_atfork. Would be good to use autoconf.<BR>> > * VMS lacks pthread_atfork? Would be good to use autoconf.<BR>> > * Win32 lacks pthread_atfork and fork. OK.<BR>> > *<BR>> > * As well, for all Posix systems, we could implement<BR>> > * atfork ourselves, as long as we provide a fork()<BR>> > * wrapper that code uses.<BR>> > */<BR>> > #if defined(_WIN32) \<BR>> > || defined(__vms) \<BR>> > || (defined(__FreeBSD__) /* && (__FreeBSD__ < 6)*/ )<BR>> > return 0;<BR>> > #else<BR>> > while (1)<BR>> > {<BR>> > int i = pthread_atfork(prepare, parent, child);<BR>> > if (i != EAGAIN)<BR>> > return i;<BR>> > sleep(0);<BR>> > }<BR>> > #endif<BR>> > }<BR>> <BR> </body>
</html>