posixmq 1.0.0

An idiomatic library for using posix message queues, with optional mio integration
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Simple utility for deleting posix message queues.
//! Useful to clean up when something doesn't clean up after itself.

extern crate posixmq;

use std::env::args_os;
use std::os::unix::ffi::OsStrExt;

fn main() {
    for arg in args_os().skip(1) {
        if let Err(e) = posixmq::remove_queue(arg.as_bytes()) {
            let name = arg.to_string_lossy();
            eprintln!("Cannot remove {}: {}", name, e);
        }
    }
}