X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 19 Aug 2008 11:43:59 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cygwin 1.7 message queues can't open more than 1 queue? Message-ID: <20080819094359.GQ21040@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <48AA255B DOT 7030405 AT mail DOT jpl DOT nasa DOT gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48AA255B.7030405@mail.jpl.nasa.gov> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Aug 18 18:43, Linh Phan wrote: > 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 > #include > #include > 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? 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/