I am trying to upgrade a messaging library from SYSV message queues to POSIX message queues. Unlike with SYSV queues, closing and/or deleting a POSIX message queue that is blocked in mq_receive()
does not unblock it, causing my programs to hang. I have also tried setting the O_NONBLOCK flag on the message queue’s attributes, but that does not seem to have an effect when set while it’s already blocked.