Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2004 09:56:33 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Chris Stenton <jacs@gnome.co.uk>
Cc:        hackers@freebsd.org
Subject:   Re: pthread - fork - execv problem
Message-ID:  <20040622145632.GF86471@dan.emsphone.com>
In-Reply-To: <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk>
References:  <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040622145632.GF86471>