cygwin 1.7 message queues can't open more than 1 queue?

Linh Phan phan@mail.jpl.nasa.gov
Wed Aug 20 18:22:00 GMT 2008


Hi Corina,

   can you give me a time frame when to expect the fix for the message 
queues will be in and so that I can get it?  Will it be a month?  Will 
you announce it on this mailling list?

Thanks again,

Linh
 > Nothing.  It's a bug in the DLL and while testing this, I found a
 > second one.  I'll apply the fixes shortly.
 >
 > Thanks for the testcase!
 >
 >
 > Corinna
 > > Hi,
 > >
 > >  I downloaded cygwin 1.7 to use message queues but unfortunately, the
 > > message queues only allows me to open
 > > 1 message queue.  If I try to open a second one, it fails with 
"Permission
 > > denied".  Below is the test I used:
 > >
 > > #include <stdio.h>
 > > #include <mqueue.h>
 > > #include <fcntl.h>
 > > main()
 > > {
 > >  int flags = O_RDWR | O_NONBLOCK | O_CREAT | O_EXCL;
 > >  struct mq_attr attr;
 > >  char queue[33];
 > >  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);
 > >  strcpy(queue, "/queue1");
 > >  mq_unlink(queue);
 > >  mqd = mq_open(queue, flags, mode, &attr); // ALWAYS FAIL HERE WITH
 > > "Permission denied"
 > >  perror("mq_open");
 > > }
 > >
 > > Does anyone know what I did wrong?



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



More information about the Cygwin mailing list