[M3devel] pthread_atfork

Mika Nystrom mika at async.caltech.edu
Sat Feb 12 04:05:25 CET 2011


Tony,

What's RTProcessC.c doing?

I note the following cryptic comment:

/* NOTE: Even userthreads now depends
 * on availability of pthreads.
 * This can be fixed if need be.
 */

now further down we can read:

#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

so on FreeBSD 5 (what I'm running on my "FreeBSD4" system),
RTProcess.RegisterForkHandlers does nothing?

Hmmm.....

    Mika



More information about the M3devel mailing list