Closed moralismercatus closed 8 years ago
I confirmed that, at least, abnormal termination (via exit() or ctrl+c) does not cause stack unwinding, and therefore does not call destructors. So, the destructor release of the mq handle would not take place.
It may be a simple, albeit temporary, workaround to set the permissions to unrestricted access upon creation of the mq. See Boost's mq docs.
MessageQueue is no longer in use.
When run from a different account (not root), crete::MessageQueue throws an exception saying it cannot open the file.
I suspect that it may be that the following scenario may be occurring. Root runs crete-dispatch, but it does not properly release/destroy the message queue. This is not a problem for root, however, as when crete-dispatch is run again, it checks if the queue exists, destroys it, and creates a new one. The problem is that the other user may not have permission to destroy the queue, and thus fails to open the file on failure of permissions.