原因說明:
原因很簡單,要注意看LINUX man手冊,man 3 mq_receive裏明確說了,“The msg_len argument must be greater than or equal to the mq_msgsize attribute of the queue(see mq_getattr(3))”。同理,在man 3 mq_send時,msg_len必須小於或等於 mq_msgsize。如果不注意,就會報 message too long的錯誤。
原因很簡單,要注意看LINUX man手冊,man 3 mq_receive裏明確說了,“The msg_len argument must be greater than or equal to the mq_msgsize attribute of the queue(see mq_getattr(3))”。同理,在man 3 mq_send時,msg_len必須小於或等於 mq_msgsize。如果不注意,就會報 message too long的錯誤。
一 下載源代碼,代碼鏈接 http://shellinabox.googlecode.com/files/shellinabox-2.14.tar.gz