cv_timedwait() & exiting procs
Andrew Gallatin
gallatin at cs.duke.edu
Mon Mar 31 09:05:25 PST 2003
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
More information about the freebsd-arch
mailing list