From owner-freebsd-stable@FreeBSD.ORG Tue Sep 16 03:32:54 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82303D2D for ; Tue, 16 Sep 2014 03:32:54 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D434A52 for ; Tue, 16 Sep 2014 03:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=aG+bTZusbRd7CNeK44w0Qzfk0f7Dcp/gU36g8baZLn8=; b=Nbfs5DFzkaTCreucUkdrA5Z6mn6c6nxMDxDHRmQl+wi4zFkJmRBwravoXSsSs0W5ZgbprVjh153fnG6w0Ag4q6NP9aJEikPrfy0V3Ir+ngHbn1a6o8qkDJrQtppziTokGAmopaXAsfGFxLBVz72T4NJ3Y9pdeC//CDgW019Z0yc=; Received: from [114.121.128.87] (port=59337 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XTjVc-002mV8-A0 for freebsd-stable@freebsd.org; Mon, 15 Sep 2014 21:32:53 -0600 Date: Tue, 16 Sep 2014 11:32:47 +0800 From: Erich Dollansky To: freebsd-stable Subject: mq_open fails when message queue attributes are set Message-ID: <20140916113247.7158a96d@X220.alogt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2014 03:32:54 -0000 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