Date: Tue, 16 Sep 2014 11:32:47 +0800 From: Erich Dollansky <erichsfreebsdlist@alogt.com> To: freebsd-stable <freebsd-stable@freebsd.org> Subject: mq_open fails when message queue attributes are set Message-ID: <20140916113247.7158a96d@X220.alogt.com>
next in thread | raw e-mail | index | archive | help
Hi, I try to use message queues but do not have much luck yet. I initialised Attributes like this: char Message [1024]; memset (&Attributes, 0, sizeof (Attributes)); Attributes.mq_maxmsg = 1024; Attributes.mq_msgsize = sizeof (Message); The following code fails: Queue = mq_open ("/testqueue", O_RDWR | O_CREAT | O_EXCL, 644, &Attributes); errno is set to 22 (Invalid argument). When I replace &Attributes with NULL, it will work. The size of Message does not matter. My old error not having the message queues in the kernel is corrected. What do I miss? Erich
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140916113247.7158a96d>