Implement creation of SysV IPC message queues
This adds the `sysvmq` package which handles SysV IPC message queues. For consistency the parameter for `permissions` is renamed to `mode` also for POSIX message queues.
This commit is contained in:
parent
a468c5d7bb
commit
4d200bb5f3
11 changed files with 271 additions and 10 deletions
|
@ -9,7 +9,7 @@ use std::fs;
|
|||
pub struct Create {
|
||||
/// Permissions (octal) to create the queue with
|
||||
#[clap(short, long)]
|
||||
permissions: Option<String>,
|
||||
mode: Option<String>,
|
||||
/// Maximum number of messages in the queue
|
||||
#[clap(short, long)]
|
||||
capacity: Option<usize>,
|
||||
|
@ -39,7 +39,7 @@ impl Create {
|
|||
pub fn run(&self) -> Result<()> {
|
||||
let mq = &mut posixmq::OpenOptions::readonly();
|
||||
|
||||
if let Some(m) = &self.permissions {
|
||||
if let Some(m) = &self.mode {
|
||||
mq.mode(u32::from_str_radix(&m, 8)?);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue