Skip to content

Conversation

hicklin
Copy link

@hicklin hicklin commented Sep 3, 2025

From reading the mqueue c implementation that this library wraps, it seems that we can't set attr to None when creating the mqueue MQ_OFlag::O_CREAT. If we do, we get an Errno::EINVAL. This means that the example in the documentation is incorrect.

What does this PR do

This PR updates the mqueue documentation example and adds some helpful documentation to explain the limits of the MqAttr input values.

src/mqueue.rs Outdated
Comment on lines 103 to 105
/// The maximum value allowed by the system can be obtained from `/proc/sys/fs/mqueue/msg_max`.
/// - `mq_msgsize`: Maximum message size in bytes.
/// The maximum value allowed by the system can be obtained from `/proc/sys/fs/mqueue/msgsize_max`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two comments are Linux-specific. But the API is cross-platform. So it's not really appropriate to put these here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed these and updated the commit.

…l documentation to explain the limits of the MqAttr input values.
Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. This change is small enough that I don't think we need a changelog entry. And I think that the CI failure should be fixed by #2682 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants