Use fork() in thread

Hi experts,
I have a plan to implement following schema:
multi-threaded pthreads application with exactly 3 threads.
One thread calls from time to time fork(), and from the child process it executes an unix command by execv().

Is that safe design? I've heard rumors that mixing threads and processes is a bad idea, but did not find any specific info.

I plan to implement the schema in Linux and Solaris.

Thanks in advance!

Are you planning to use pthread_atfork()?

fpmurphy, thanks for the hint!,
I found this post:
comp.unix.programmer: Re: fork() from a thread (pthreads)
That explained all my concerns.

Also Programming with POSIX� Threads by David R. Butenhof explains much of what I needed.

Thanks,
Pavel.

An excellent book. Dave was deeply involved with the development of POSIX.1c.

I note that you mention that you will be developing for both Solaris and Linux. Linux has a number of threading models as does Solaris and the threads implementations vary depending on the particular OS version your application is running on. Test and test again!