This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Fix sem_getvalue
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 18 Sep 2013 14:12:45 -0400
- Subject: Re: Fix sem_getvalue
- Authentication-results: sourceware.org; auth=none
- References: <52397810 dot 1070600 at emsys dot de>
- Reply-to: cygwin-patches at cygwin dot com
On Wed, Sep 18, 2013 at 11:53:20AM +0200, Paul Kunysch wrote:
>Hello
>
>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
>EINVAL if STATUS_INVALID_HANDLE == status.
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.
cgf