Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 12:05:17 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        freebsd-arch@freebsd.org
Subject:   cv_timedwait() & exiting procs
Message-ID:  <16008.30029.620721.433243@grasshopper.cs.duke.edu>

next in thread | raw e-mail | index | archive | help


FreeBSD's cv_timedwait() function helpfully notices that a process is
exiting and returns EWOULDBLOCK if it is.

However, if you call cv_timedwait() in the context of a process which
is already exiting, you always get back EWOULDBLOCK, regardless of
whether or not the timeout expired.  Similarly for the cv_wait_sig()
and cv_timedwait_sig(), except they set EINTR.

Does anyone else consider this behaviour to be a bug?  I think it
should only return EWOULDBLOCK/EINTR because a process is exiting if
the process wasn't already exiting when it entered the cv_*wait*
routine, but perhaps I'm misguided...

Drew



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