From owner-freebsd-hackers Mon Nov 24 15:35:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA16055 for hackers-outgoing; Mon, 24 Nov 1997 15:35:46 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from zen.nash.org (nash.pr.mcs.net [204.95.47.72]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA16045 for ; Mon, 24 Nov 1997 15:35:41 -0800 (PST) (envelope-from alex@zen.nash.org) Received: (from alex@localhost) by zen.nash.org (8.8.8/8.8.7) id RAA00666; Mon, 24 Nov 1997 17:33:17 -0600 (CST) (envelope-from alex) Message-Id: <199711242333.RAA00666@zen.nash.org> Date: Mon, 24 Nov 1997 17:33:17 -0600 (CST) From: Alex Nash Reply-To: nash@mcs.com Subject: Re: pthread_cond_timedwait returning wrong error? To: bradley@dunn.org cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On 24 Nov, Bradley Dunn wrote: > On Sun, 23 Nov 1997, Julian Elischer wrote: > >> don't forget 2.2.x >> (it has basically the same code) > >> > > Is EAGAIN the correct error for a timeout from a >> > > pthread_cond_timedwait() call? I would think that >> > > ETIMEDOUT would be more appropriate. >> > >> > According to my 1996 edition of ANSI/IEEE std 1003.1, you are correct -- >> > ETIMEDOUT should be returned. I've committed a fix for this into >> > -current. > > 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. Alex