POSIX队列和msg_max [英] POSIX queues and msg_max
本文介绍了POSIX队列和msg_max的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在弄一点POSIX队列,遇到了一个问题.创建新队列时,我可以指定例如消息的大小以及队列中可以有多少条消息.我的正常限制是10,如
/proc/sys/fs/mqueue/msg_max
除了
之外,是否有一种简单的方法可以在程序执行期间进行更改
echo number > /proc/sys/fs/mqueue/msg_max
也许存在一些用于设置此类内容的系统调用.
解决方案
否.
该限制是系统范围的限制;这就是为什么它在/proc/sys
中.如果要更改它,则必须使用已经显示的echo
命令.
I am toying a bit with POSIX queues and I encountered a problem. When creating a new queue I can specify for example the size of the message and how many messages there can be in the queue. My normal limit is 10 as found in
/proc/sys/fs/mqueue/msg_max
is there an easy way to change it during program execution, apart from
echo number > /proc/sys/fs/mqueue/msg_max
maybe some system call for setting such things exists.
解决方案
No.
That limit is a system-wide limit; that's why it's in /proc/sys
. If you want to change it you will have to use the echo
command you have already shown.
这篇关于POSIX队列和msg_max的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文