Possible race in SYSV IPC (semaphores)
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Nov 23 17:29:00 GMT 2012
On Nov 23 17:16, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> > This should avoid the race (*and* work...)
> > Please give it a try.
>
> Thanks! I've tried both patches (pipe race + semadj), and they do seem to work!
Thanks for testing.
> Although (not being a party pooper :-), I think that all the logic
> around "pipe_instance" can now be dropped entirely, and benefit from eliminating
> an unnecessary synchronization point (pipe_instance is now only used
> for logging a proper pipe ID, which is not even seen in regular use,
> and for an assert(), which again is only there in debug mode builds).
> So there is no need to arrange Enter'ing/Leave'ing of the critical section
> to do just the hidden things, yet the working code would be a bit cleaner.
I agree. I'll do that in the next couple of days.
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
More information about the Cygwin
mailing list