Using system() with pthreads
Is it safe to use the system() function call from a pthread?
I've inherited some code that is heavily using pthread on a Linux 2.4.10 kernel, but it also has many instances of system("<program>").
The system() call will result in a fork() and execve(). I thought I read some place that it wasn't safe to use execve with threads?
The code will SEGV on occasion, but it is very random and seems to be more frequent based on the load of the system; the more thread running the higher chance that it will SEGV.
Is there a good source to reference on if system() is thread safe?
Any help appreciated!
--mark
|