This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin 1.7 message queues - permission denied error still exists


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]