Date: Mon, 24 Oct 2005 12:41:01 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Sven Berkvens-Matthijsse <sven@ilse.net> Cc: Marc Olzheim <marcolz@stack.nl>, Marc Olzheim <marcolz@ilse.net>, David Xu <davidxu@freebsd.org>, freebsd-threads@freebsd.org Subject: Re: threads/76690: fork hang in child for (-lc_r & -lthr) Message-ID: <Pine.GSO.4.43.0510241239180.17636-100000@sea.ntplx.net> In-Reply-To: <20051024144529.GP22568@ilse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Oct 2005, Sven Berkvens-Matthijsse wrote: > > It may even be enough just to set __isthreaded to 0 in the child > > after the fork() before calling any malloc()'s and free()'s so they > > don't try to use the lock. > > But then the free() in the child process may be using an unstable > state of the malloc system (because if you don't acquire the lock > before the fork(), malloc() may be busy in the middle of the fork()). I don't think that can happen because libc_r will not switch out a thread that is in a critical region (and libc locks are critical regions) until it leaves the region. -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0510241239180.17636-100000>