From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 22 13:00:41 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD7F216A41C for ; Wed, 22 Jun 2005 13:00:41 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98B8043D48 for ; Wed, 22 Jun 2005 13:00:41 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id B890D86DCA; Wed, 22 Jun 2005 15:00:39 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10433-10; Wed, 22 Jun 2005 15:00:35 +0200 (CEST) Received: from firewall.demig (p50839530.dip0.t-ipconnect.de [80.131.149.48]) by server.absolute-media.de (Postfix) with ESMTP id E46C086E4B; Wed, 22 Jun 2005 15:00:34 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.1) with SMTP id j5MCwrqa040964; Wed, 22 Jun 2005 14:58:53 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: , "Peter Edwards" , "Charles Sprickman" Date: Wed, 22 Jun 2005 14:58:52 +0200 Message-ID: <000801c5772a$23dac9c0$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <20050622124007.75760.qmail@web52702.mail.yahoo.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: hackers@freebsd.org Subject: RE: Nagios and threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 13:00:42 -0000 > [snip] > > at least some assumptions that the child won't be > > doing much before > > execing or exiting. (But Im sure one of the > > The child process should be able to call any system > calls it likes -without assuming that pthreads from > the parent process have been copied over to the child > process. I spose most implementations support that. > > regards > -kamal >From "Programming with POSIX Threads" [David R. Butenhof]: p.197-198: ... Avoid using fork in a threaded program (if you can) unless you intend to exec a new program immediately ... Pthreads does not "terminate" the other threads in a forked process. ... They simple cease to exist. ... The state of mutexes is not affected by a fork. If it was locked in the parent it is locked in the child! Norbert