Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2007 00:57:06 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Garrett Cooper <youshi10@u.washington.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Trying to join an already exited pthread
Message-ID:  <Pine.GSO.4.64.0702090053310.6692@sea.ntplx.net>
In-Reply-To: <45CC06A3.5080909@u.washington.edu>
References:  <Pine.LNX.4.43.0702071314560.22034@hymn08.u.washington.edu> <eqdhl2$1tmb$1@wattres.Watt.COM> <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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0702090053310.6692>