Eric Blake wrote: > Although it gets prohibitively expensive in a multi-threaded process to > ensure proper locking between all threads that might want to use > posix_spawn
Why locking? posix_spawn uses fork() - the vfork() optimization is not possible in the case when there are file actions -, which creates a child process with a single thread. So, in the child, there are no other threads until the exec() call, and the condition variables, mutexes, etc. are just inactive memory regions. Bruno