From owner-freebsd-threads@FreeBSD.ORG Mon Aug 27 17:01:00 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9F0E16A418; Mon, 27 Aug 2007 17:01:00 +0000 (UTC) (envelope-from sysmaint@contek.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5B74513C4B6; Mon, 27 Aug 2007 17:01:00 +0000 (UTC) (envelope-from sysmaint@contek.com) Received: from mr08.lnh.mail.rcn.net ([207.172.157.28]) by smtp02.lnh.mail.rcn.net with ESMTP; 27 Aug 2007 12:32:18 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr08.lnh.mail.rcn.net (MOS 3.8.3-GA) with ESMTP id JAR95611; Mon, 27 Aug 2007 12:32:18 -0400 (EDT) Received: from 207-172-216-114.s876.apx1.sbo.ma.dialup.rcn.com (HELO mail.contek.com) ([207.172.216.114]) by smtp01.lnh.mail.rcn.net with ESMTP; 27 Aug 2007 12:32:17 -0400 Received: by mail.contek.com (Postfix, from userid 10112) id 31764399A2; Mon, 27 Aug 2007 12:32:16 -0400 (EDT) In-Reply-To: To: Daniel Eischen Date: Mon, 27 Aug 2007 12:32:15 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL123f (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Message-Id: <20070827163216.31764399A2@mail.contek.com> From: sysmaint@contek.com (Douglas Wells) Cc: Douglas Wells , freebsd-threads@freebsd.org Subject: Re: threads/115211: pthread_atfork misbehaves in initial thread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2007 17:01:01 -0000 > On Mon, 27 Aug 2007, Douglas Wells wrote: > > > Yes, I can verify that using: > > -pthread => erroneous behavior > > -lthr => expected behavior > > on my installation of 6.2. > > The problem is that the program isn't threaded yet. I'm not sure if > this is really a problem since pthread_atfork() is used to protect > and initialize data when a multi-threaded program forks. If the > program isn't threaded, is there really a need to do this? No, I did not actually encounter this problem in a real program. I came upon it based upon a discussion elsewhere. When I encountered the problem on FreeBSD, I reported it with low priority. > That said, it should work regardless. Exactly. > DE - dmw