posix mqueue 使用注意事项

1,头文件:
#include <fcntl.h>           /* For O_* constants */
#include <sys/stat.h>        /* For mode constants */
#include <mqueue.h>

2,mq_open 在指定 mqueue 的名字时,必须以 ”/" 开头,并且名字中只能有一个 “/"

3,对mqueue的队列位置进行重定向
     $ mkdir /dev/mqueue
    $ mount -t mqueue none /dev/mqueue

4,在编译时要加上 -lrt 选项。



你可能感兴趣的:(posix mqueue 使用注意事项)