Re: Incorrect cv_wait_sig() return values?

2010-08-04 Thread Kostik Belousov
On Wed, Aug 04, 2010 at 10:36:24AM -0400, Andrew Gallatin wrote: Hi, I recently noticed that cv_wait_sig() will return -1 rather than EINTR when a SIGINT is delivered. This is in contrast to CONDVAR(9) which states: ... cv_wait_sig() and cv_timedwait_sig() return prematurely with

Re: Incorrect cv_wait_sig() return values?

2010-08-04 Thread Kostik Belousov
On Wed, Aug 04, 2010 at 06:46:04PM +0300, Kostik Belousov wrote: On Wed, Aug 04, 2010 at 10:36:24AM -0400, Andrew Gallatin wrote: Hi, I recently noticed that cv_wait_sig() will return -1 rather than EINTR when a SIGINT is delivered. This is in contrast to CONDVAR(9) which states:

Re: Incorrect cv_wait_sig() return values?

2010-08-04 Thread Andrew Gallatin
Kostik Belousov wrote: BTW, -1 is ERESTART, so if you have SIGINT catched with SA_RESTART flag in the process that initiated kldload(2) syscall, then -1 is the right return code for cv_wait_sig. Ah, makes sense. I hadn't considered that a BSD kernel error could be negative. I should have