From owner-freebsd-stable@FreeBSD.ORG Mon Sep 15 08:56:42 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 0F12CAB for ; Mon, 15 Sep 2014 08:56:42 +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 DB4D6168 for ; Mon, 15 Sep 2014 08:56:41 +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:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=A51p5+9e5+/6yOE2F2SIyKd7sqkkS77jU2Tc38xQVtA=; b=Z6weEUcXZqrr2SsuTUXOGZmWjEk0ainW5IvJbElOkpH+Pw5jPZgnUK7QqZV/XCQ+r7VajIjCchwPraiRKBQm8ecmMWT1xhW5LUWGL1TfhQh2VZjzmNjTWjwjC86YNrhwZcllfoDnBFWoZ5i+ml8HmGGecxlL6aYzRF94cCVAhaU=; Received: from [39.249.182.93] (port=36201 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 1XTS5Q-002ULC-1R; Mon, 15 Sep 2014 02:56:41 -0600 Date: Mon, 15 Sep 2014 16:56:34 +0800 From: Erich Dollansky To: Mateusz Guzik Subject: Re: mq_open sets errno to 78 when queue does not exist Message-ID: <20140915165634.30fe6e8a@X220.alogt.com> In-Reply-To: <20140915082635.GA3042@dft-labs.eu> References: <20140915145912.361a25e9@X220.alogt.com> <20140915082635.GA3042@dft-labs.eu> 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: Cc: freebsd-stable 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: Mon, 15 Sep 2014 08:56:42 -0000 Hi, On Mon, 15 Sep 2014 10:26:35 +0200 Mateusz Guzik wrote: > On Mon, Sep 15, 2014 at 02:59:12PM +0800, Erich Dollansky wrote: > > Hi, > > > > I have a very simple program. It basically tries to open a message > > queue which does not exists. mq_open returns then -1 but errno is > > set to 78 which is defined as this: > > > > #define ENOSYS 78 /* Function not implemented */ > > > > The line in question: > > > > res = mq_open ("/doesnotexist", O_RDWR); > > > > "/doesnotexists" is the non-existing message queue the program tests > > for. res will be set correctly to -1 but errno is set then to 78. > > > > If I want to create the message queue, I will get the same error. > > > > uname -a says: > > > > FreeBSD X220.alogt.com 10.1-PRERELEASE FreeBSD 10.1-PRERELEASE #45 > > r271420: Sat Sep 13 15:09:34 WITA 2014 > > erich@X220.alogt.com:/usr/obj/usr/src/sys/X220 amd64 > > > > Do I see or do something wrong or is this an error? > > > > Do you have mqueuefs loaded? > of course not. I was under the impression that options _KPOSIX_PRIORITY_SCHEDULING in the kernel configuration will do. Thanks for the hint. Erich