delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/21/12:23:35

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 21 Sep 2009 18:23:14 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 1.7 message queues - permission denied error still exists
Message-ID: <20090921162314.GJ20981@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1DC35497-BBA8-4F50-9DB3-3C5EFFCD17BD AT semanchuk DOT com> <20090913162218 DOT GA19315 AT ednor DOT casa DOT cgf DOT cx> <4318136D-5D7A-4DF2-B86D-6025B246DA7D AT semanchuk DOT com> <416096c60909131015v5e4b6021wffe114209827930d AT mail DOT gmail DOT com> <34E2DEE0-9186-4A56-8A2E-B4BE99278FA7 AT semanchuk DOT com> <20090913203240 DOT GA4166 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20090913203240.GA4166@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Sep 13 16:32, Christopher Faylor wrote:
> 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.

Just FYI, running Cygserver is required only for XSI IPC.  The POSIX
IPC functions are supposed to work without Cygserver.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019