From owner-freebsd-threads@FreeBSD.ORG Thu Apr 19 05:43:17 2007 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D73A716A409 for ; Thu, 19 Apr 2007 05:43:17 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 9B39513C4BB for ; Thu, 19 Apr 2007 05:43:17 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.14.0/8.14.0/NETPLEX) with ESMTP id l3J5hGrw009832; Thu, 19 Apr 2007 01:43:16 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.ntplx.net [204.213.176.10]); Thu, 19 Apr 2007 01:43:16 -0400 (EDT) Date: Thu, 19 Apr 2007 01:43:16 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Arunachalam In-Reply-To: <10071680.post@talk.nabble.com> Message-ID: References: <10058476.post@talk.nabble.com> <20070418220344.GA36558@kobe.laptop> <10071680.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-threads@freebsd.org Subject: Re: Regarding spawning X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 05:43:17 -0000 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