Function posixmq::remove_queue[][src]

pub fn remove_queue<N: AsRef<[u8]> + ?Sized>(name: &N) -> Result<(), Error>

Delete a posix message queue.

A '/' is prepended to the name if it doesn't start with one already. (it would have to append a '\0' and therefore allocate or copy anyway.)

Processes that have it open will still be able to use it.

Errors

  • Queue doesn't exist (ENOENT) => ErrorKind::NotFound
  • Name is invalid (ENOENT or EACCESS) => ErrorKind::NotFound or ErrorKind::PermissionDenied
  • Not permitted to delete the queue (EACCES) => ErrorKind::PermissionDenied
  • Posix message queues are disabled (ENOSYS) => ErrorKind::Other
  • Name contains '\0' bytes => ErrorKind::InvalidInput
  • Name is too long (ENAMETOOLONG) => ErrorKind::Other
  • Possibly other