Date: Mon, 24 Nov 1997 17:33:17 -0600 (CST) From: Alex Nash <nash@mcs.com> To: bradley@dunn.org Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: pthread_cond_timedwait returning wrong error? Message-ID: <199711242333.RAA00666@zen.nash.org> In-Reply-To: <Pine.BSF.3.96.971124013350.20807A-100000@ns3.harborcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711242333.RAA00666>