# HG changeset patch # User jlarmour # Date 1047094592 0 # Node ID ca97f6817edac9da9e457769468d46ed39c1fd31 # Parent b4a3f003fc22b55d70caa51b2f9c8c47e9815625 * tests/pselect.c (pthread_entry1): Allow for infrequent but occasional off by one error due to race condition when signalling. diff --git a/packages/io/fileio/current/ChangeLog b/packages/io/fileio/current/ChangeLog --- a/packages/io/fileio/current/ChangeLog +++ b/packages/io/fileio/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-08 Jonathan Larmour + + * tests/pselect.c (pthread_entry1): Allow for infrequent but + occasional off by one error due to race condition when + signalling. + 2003-02-24 Jonathan Larmour * cdl/fileio.cdl: Add doc link. diff --git a/packages/io/fileio/current/tests/pselect.c b/packages/io/fileio/current/tests/pselect.c --- a/packages/io/fileio/current/tests/pselect.c +++ b/packages/io/fileio/current/tests/pselect.c @@ -234,6 +234,13 @@ void *pthread_entry1( void *arg) } + // If we were interrupted at just the wrong point above we may still + // have a SIGUSR1 signal pending that we didn't handle, and so won't + // have accounted for. So let's look... + CYG_TEST_CHECK( 0 == sigpending( &mask ), "sigpending() returned error"); + if (1 == sigismember(&mask, SIGUSR1) ) + pselect_eintr++; + pthread_sigmask( SIG_SETMASK, &oldmask, NULL ); pthread_exit(arg);