Trying to join an already exited pthread
Daniel Eischen
deischen at freebsd.org
Fri Feb 9 05:57:08 UTC 2007
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
More information about the freebsd-hackers
mailing list