rm/rm.rs
1//! Simple utility for deleting posix message queues.
2//! Useful to clean up when something doesn't clean up after itself.
3
4extern crate posixmq;
5
6use std::env::args_os;
7use std::os::unix::ffi::OsStrExt;
8
9fn main() {
10 for arg in args_os().skip(1) {
11 if let Err(e) = posixmq::remove_queue(arg.as_bytes()) {
12 let name = arg.to_string_lossy();
13 eprintln!("Cannot remove {}: {}", name, e);
14 }
15 }
16}