From owner-freebsd-hackers Tue Nov 25 09:47:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA01836 for hackers-outgoing; Tue, 25 Nov 1997 09:47:11 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.5.85]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA01830 for ; Tue, 25 Nov 1997 09:47:08 -0800 (PST) (envelope-from tlambert@usr08.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.7/8.8.7) id KAA15925; Tue, 25 Nov 1997 10:47:01 -0700 (MST) Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp04.primenet.com, id smtpd015894; Tue Nov 25 10:46:51 1997 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id KAA02503; Tue, 25 Nov 1997 10:46:49 -0700 (MST) From: Terry Lambert Message-Id: <199711251746.KAA02503@usr08.primenet.com> Subject: Re: pthread_cond_timedwait returning wrong error? To: nash@mcs.com Date: Tue, 25 Nov 1997 17:46:48 +0000 (GMT) Cc: bradley@dunn.org, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199711242333.RAA00666@zen.nash.org> from "Alex Nash" at Nov 24, 97 05:33:17 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > While we are talking about threads, any comments on PR-4376? > > You are 100% right about the return value being incorrect. > Unfortunately, this problem is present in many more functions than just > pthread_join(). > > From what I can tell by looking at an old DEC OSF/1 reference on > pthreads, returning -1 an setting errno is the way things used to work. > Apparently POSIX has changed that. Given that "errno" is a global variable, this is actually a good thing. How many times have you wished for: errno = lseek(int fildes, off_t newoffset, int whence, off_t *oldoffset) Or: errno = lseek(int fildes, off_t *offset, int whence) Instead of: off_t lseek(int fildes, off_t offset, int whence) So that you didn't have to worry about the sign bit? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.