From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 9 05:57:08 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0186E16A403 for ; Fri, 9 Feb 2007 05:57:08 +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 B9A0D13C474 for ; Fri, 9 Feb 2007 05:57:07 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.8/8.13.8/NETPLEX) with ESMTP id l195v6Sr018269; Fri, 9 Feb 2007 00:57:06 -0500 (EST) 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]); Fri, 09 Feb 2007 00:57:06 -0500 (EST) Date: Fri, 9 Feb 2007 00:57:06 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Garrett Cooper In-Reply-To: <45CC06A3.5080909@u.washington.edu> Message-ID: References: <87D4B047-DC72-427B-863F-A082C3A4E5CD@u.washington.edu> <45CB38D8.1000706@u.washington.edu> <45CC014B.9020303@u.washington.edu> <45CC01B0.8050502@u.washington.edu> <45CC06A3.5080909@u.washington.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Trying to join an already exited pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2007 05:57:08 -0000 On Thu, 8 Feb 2007, Garrett Cooper wrote: > > Actually, now that I think about it the calls I made with ps in the program > are valid for Linux but not for FreeBSD (they're for getting thread > listings). Hence error code 2. > > From intro(2): > > 2 ENOENT No such file or directory. A component of a specified > pathname did not exist, or > the pathname was an empty > string. > > Didn't think that a bad command would return errno=2 though.. And hopefully you've realized that your code is totally bogus since pthread_foo() don't set errno. All the pthread_foo() functions _return_ the error. If your code is not checking the return values from those functions, it is wrong on every platform, not just FreeBSD. -- DE