From owner-freebsd-current Wed Jun 24 16:53:55 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA00546 for freebsd-current-outgoing; Wed, 24 Jun 1998 16:53:55 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA00396 for ; Wed, 24 Jun 1998 16:53:03 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id KAA05207; Thu, 25 Jun 1998 10:01:38 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199806250001.KAA05207@cimlogic.com.au> Subject: Re: Weirdness with pthreads in -current In-Reply-To: <19980624182243.37940@kublai.com> from Brian Cully at "Jun 24, 98 06:22:43 pm" To: shmit@kublai.com Date: Thu, 25 Jun 1998 10:01:38 +1000 (EST) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brian Cully wrote: > What's strange is that if I remove the `return NULL' statement in > thread_func() I always get ESRCH, but with it there I only get ESRCH when > the sleep() call exists. > > This may (and probably is) some drain-bamage on my part, but the > behaviour is certainly weird enough that I think that there's some kind > of bug somewhere in the thread code. :-) Well it's not brain damage on your part at all. There are some missing {} that cause ESRCH to be returned if (a) you have to wait to join; and (b) you don't ask for the exit status. Me fix... -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message