Date: Thu, 19 Apr 2007 01:43:16 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Arunachalam <arunachalamp@huawei.com> Cc: freebsd-threads@freebsd.org Subject: Re: Regarding spawning Message-ID: <Pine.GSO.4.64.0704190135580.20088@sea.ntplx.net> In-Reply-To: <10071680.post@talk.nabble.com> References: <10058476.post@talk.nabble.com> <20070418220344.GA36558@kobe.laptop> <10071680.post@talk.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Apr 2007, Arunachalam wrote: >> Hello , >> >> Thanks for the reply. >> >> ya it is a minimal program. In the main, fork a process, in the child and >> parent , just the debug statements. >> >> ya , it fails all the time if i link lc_r. >> >> But when i link with lthr, the problem is not there, means it is able to >> spawn. >> >> Is that any problem with lc_r, can i use this lthr for my application. You need to provide a sample program. There is little useful information in what you provide above. Also, the only purpose for forking from a multithreaded process is to exec() another program. See the POSIX spec for more information. The only functions you can call from the child, aside from the exec() family of functions, are async-signal-safe functions. The behavior when calling any other functions is undefined according to POSIX. libc_r, libpthread, and probably to some extent libthr will have undefined behavior if used in this manner. -- DE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0704190135580.20088>