raise(-1) has stopped returning an error recently

Duncan Roe duncan_roe@optusnet.com.au
Tue Nov 23 08:27:23 GMT 2021


On Mon, Nov 22, 2021 at 02:06:19PM +0100, cygwin wrote:
> On Nov 22 11:25, Corinna Vinschen via Cygwin wrote:
> > On Nov 22 16:20, Duncan Roe wrote:
> > > Hi,
> > >
> > > I stumbled across this when running 'make check' in the grep source directory.
> > >
> > > test-raise failed when it didn't a few weeks ago.
> >
> > Pretty unlikely.  This code didn;'t change for ages.  I just checked
> > against Cygwin 3.2.0 and it also returns success.
> >
> > > #include <stdio.h>
> > > #include <signal.h>
> > >
> > > int
> > > main (void)
> > > {
> > >   int retcod;
> > >
> > >   retcod = raise (-1);
> > >   printf("raise(-1) returned %d\n", retcod);
> > > }
> >
> > Thanks for the STC.  There are actually two long-standing problems,
> > one in raise, calling pthread_kill even for non-threaded processes,
> > one in pthread_kill, not checking the signal number.
> >
> > I'll patch them right away.
>
> I created a patchset:
> https://sourceware.org/git?p=newlib-cygwin.git;a=commitdiff;h=d54d8f173d66
> https://sourceware.org/git?p=newlib-cygwin.git;a=commitdiff;h=24bffff63eb7
> https://sourceware.org/git?p=newlib-cygwin.git;a=commitdiff;h=afb7c557d2af
>
> Please test the latest developer snapshot from http://cygwin.com/snapshots/
>
>
> Thanks,
> Corinna

Thanks, that fixed it.

Btw to whoever maintains grep for cygwin: 'make check' should pass on
next release (I patched out the surrogate-pair failre).

Cheers ... Duncan.


More information about the Cygwin mailing list