X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sun, 13 Sep 2009 16:32:40 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin 1.7 message queues - permission denied error still  exists
Message-ID: <20090913203240.GA4166@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <1DC35497-BBA8-4F50-9DB3-3C5EFFCD17BD@semanchuk.com>  <20090913162218.GA19315@ednor.casa.cgf.cx>  <4318136D-5D7A-4DF2-B86D-6025B246DA7D@semanchuk.com>  <416096c60909131015v5e4b6021wffe114209827930d@mail.gmail.com>  <34E2DEE0-9186-4A56-8A2E-B4BE99278FA7@semanchuk.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <34E2DEE0-9186-4A56-8A2E-B4BE99278FA7@semanchuk.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Sun, Sep 13, 2009 at 01:25:01PM -0400, Philip Semanchuk wrote:
>On Sep 13, 2009, at 1:15 PM, Andy Koppe wrote:
>>> FAQ:
>>> ====
>>>
>>> - Q: How do I know that I'm running Cygwin 1.7.0-61?
>>>
>>>  A: The `uname -v' command prints "2009-09-11 01:25"
>
>Thanks Andy. Mine is dated 2009-08-20 10:56; I'm sure that's well past  
>the 1.7.0-29 release which is the one I'm concerned with.

It is, but there is no reason to be running an earlier version.

I just modified the test case from the original report:

>>>cut here<<<
#include <stdio.h>
#include <mqueue.h>
#include <fcntl.h>
#include <string.h>

main()
{
 int flags = O_RDWR | O_NONBLOCK | O_CREAT | O_EXCL;
 struct mq_attr attr;
 char queue[80];
 char *e;
 mode_t mode = strtoul("644", &e, 8);
 mqd_t mqd;


 memset((void *) &attr, 0, sizeof(struct mq_attr));
 attr.mq_maxmsg = (long) 10;
 attr.mq_msgsize = (long) 24;
 strcpy(queue, "/queue0");
 mq_unlink(queue);
 mqd = mq_open(queue, flags, mode, &attr);
 if (mqd < 0)
   perror("mq_open 1");
 strcpy(queue, "/queue1");
 mq_unlink(queue);
 mqd = mq_open(queue, flags, mode, &attr); // ALWAYS FAIL HERE WITH "Permission denied"
 if (mqd < 0)
   perror("mq_open 2");
}
>>>cut here<<<

It behaves the same on both linux and cygwin.

Make sure that you've read:

http://cygwin.com/faq/faq-nochunks.html#faq.programming.ipc

And have cygserver running properly.

The cygcheck output mentioned on the problems page is not optional.  If
you had provided that in your first message we'd know what version of
cygwin you had installed and if you had cygserver running.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

