/*
* call-seq:
* mq.nonblock? => true or false
*
* Returns the current non-blocking state of the message queue descriptor.
*/
static VALUE nonblock_p(VALUE self)
{
struct posix_mq *mq = get(self, 1);
if (mq_getattr(mq->des, &mq->attr) < 0)
rb_sys_fail("mq_getattr");
return mq->attr.mq_flags & O_NONBLOCK ? Qtrue : Qfalse;
}