X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 24 Sep 2009 11:15:08 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Re: Cygwin 1.7 message queues - permission denied error still exists Message-ID: <20090924091508.GC30267@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20090921162314 DOT GJ20981 AT calimero DOT vinschen DOT de> <4ABA7B1E DOT 7080100 AT gmx DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ABA7B1E.7080100@gmx.de> User-Agent: Mutt/1.5.19 (2009-02-20) 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 Sep 23 21:46, Ren? Liebscher wrote: > there is another problem with the queues. > The mentioned test case opens two different queues in the same process. > > But if you open the same queue in two different processes you get also a > permission denied error. > > I add here some test case: > --- file: receiver.c ----------------------- > [...] > ------------------------------------------ > --- file: sender.c ---------------------- > [...] > ----------------------------------------- > It just sends an integer from sender to receiver. > [...] > However on cygwin it doesn't matter which of the processes you start > first, the second one will get a permission denied. > --------------------------- > $ ./sender > Sent 1 > Sent 2 > Sent 3 > Sent 4 > Sent 5 > Sent 6 > Sent 7 > Sent 8 > --- it waits here to get free places in queue (when receiver is running) > --------------------------- > But the receiver gets this: > --------------------------- > $ ./receiver > Receiver: mq_open: Permission denied > --------------------------- Thanks for the testcase! I could easily reproduce the problem and it turned out that it was a miserable copy/paste bug. Due to that the function opening the mutex object in the second process requests more access than the process creating the mutex has granted other processes. Consequentially the second process got a "Permission denied". I've fixed the bug in CVS. The next 1.7.0 test release or the next developer snapshot on http://cygwin.com/snapshots/ (whatever comes first) will have the patch. Thanks again for the testcase and the report, 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