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: Re: Cygwin 1.7 message queues - permission denied error still exists


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


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