fix off-by-one in dup2

2013-09-25 Thread Eric Blake
Solves the segfault here: http://cygwin.com/ml/cygwin/2013-09/msg00397.html but does not address the fact that we are still screwy with regards to rlimit. == Ultimately, based on my understanding of POSIX and glibc, my goal is to have a number of changes (this patch only scratches the surface;

Re: Fix sem_getvalue

2013-09-25 Thread Christopher Faylor
On Wed, Sep 25, 2013 at 12:41:17PM +0200, Paul Kunysch wrote: >> 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 did not look for other callers. > >I just wrote a very s

Re: Fix sem_getvalue

2013-09-25 Thread Paul Kunysch
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 did not look for other callers. I just wrote a very simple test for sem_getvalue() and copied different cygwin1.dll versions