Bug when closing a busy file descriptor.
Hi,
there is a bug when closing a busy file descriptor: the close function keeps incrementing the file descriptor reference count making it impossible to really close the file descriptor.
The attached patch fixes this.
Signature · 1 line
Gilles Chanteperdrix
skins/rtdm/core.c +2 -0
@@ -340,6 +340,7 @@ XENO_ASSERT(RTDM, !rthal_local_irq_test(), rthal_local_irq_enable(););if (unlikely (ret == -EAGAIN ) && !rtdm_in_rt_context ()) { +rtdm_context_unlock (context);msleep (CLOSURE_RETRY_PERIOD ); goto again; }else if (unlikely (ret <0 ))
@@ -354,6 +355,7 @@ ret = -EAGAIN ; goto unlock_out; } +rtdm_context_unlock (context);msleep (CLOSURE_RETRY_PERIOD ); goto again; }
Quoted 8 lines · Gilles Chanteperdrix
Hi,
there is a bug when closing a busy file descriptor: the close function keeps incrementing the file descriptor reference count making it impossible to really close the file descriptor.
The attached patch fixes this.
Yep. Applied, thanks.
Jan