pthread - fork - execv problem
Dan Nelson
dnelson at allantgroup.com
Tue Jun 22 07:57:17 PDT 2004
In the last episode (Jun 21), Chris Stenton said:
> I am trying to help port over an app thats posix threaded. One thread
> uses fork, dup2 and execv to start a child programme in this case an
> mp3 player. However, under FreeBSD-5.2.1, the execv causes all the
> threads in the parent process to be blocked until the child process
> returns. Is there a mechanism to get around this.
Do you have a small testcase? I have not seen your problem in any
other threaded programs on FreeBSD.
It may be an application bug. After a fork both processes are
independant. The child should not be able to affect the parent like
this, unless the parent does something like holding a mutex used by all
the threads and calling wait().
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list