Fix sem_getvalue

Christopher Faylor
Wed Sep 18 18:12:00 GMT 2013

On Wed, Sep 18, 2013 at 11:53:20AM +0200, Paul Kunysch wrote:
>In 1.7.24 and 1.7.25 sem_getvalue() returns the current value instead of 
>setting the out-parameter and returning 0/-1 for success/error.
>I attached a simple fix.

That looks like a reasonable fix.  Did you trace through all of the
callers of semaphore::_getvalue to make sure that some of them aren't
relying on the old behavior?

>I don't know if this should be further improved by setting errno to 

That sounds reasonable too.

>Unfortunately I wasn't able to run and extend the unit tests.  Running 
>"make check" fails with "No rule to make target `dataascii.o', needed by 
>`libltp.a'".  The VPATH seems to be extended correctly.

The tests are in a severe case of bit rot unfortunately.  It would be nice
if someone made it a mission to improve Cygwin's testing from nonexistent to
something but that is a very unrewarding a job.


More information about the Cygwin-patches mailing list