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.

@@ -9,17 +9,18 @@
//! use nix::sys::stat::Mode;
Copy link
Author

Choose a reason for hiding this comment

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

Is there a reason why no_run is required? This is only executed by cargo test and if this fails due to missing kernel modules, so would the mqueue tests.

Copy link
Member

Choose a reason for hiding this comment

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

No, I think it would be ok to remove the no_run. Would you please do that?

Copy link
Author

Choose a reason for hiding this comment

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

OK. I have amended the commit to remove no_run.

…l documentation to explain the limits of the MqAttr input values.
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