diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/psignal.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index d658274de8..e0e3e86a76 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -112,10 +112,17 @@ void _POSIX_signals_Post_switch_extension( POSIX_API_Control *api; int signo; ISR_Level level; + int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* + * We need to ensure that if the signal handler executes a call + * which overwrites the unblocking status, we restore it. + */ + hold_errno = _Thread_Executing->Wait.return_code; + + /* * api may be NULL in case of a thread close in progress */ if ( !api ) @@ -149,6 +156,8 @@ void _POSIX_signals_Post_switch_extension( _POSIX_signals_Check_signal( api, signo, true ); } } + + _Thread_Executing->Wait.return_code = hold_errno; } /* |