Use PTHREAD_PROCESS_SHARED mutexes if possible.