From c9d19a35b19cfc708ed61eaaec470052baa79c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gleb=20Balykov/Platform=20Lab=20/SRR/Staff=20Engineer/Sams?= =?UTF-8?q?ung=C2=A0Electronics?= Date: Tue, 18 Jan 2022 00:35:55 +0300 Subject: [Tizen] Workaround for undocumented EAGAIN returned from pthread_kill (#328) This is partial cherry-pick of https://github.com/dotnet/runtime/pull/32167 Also, similar issue was fixed in mono: https://github.com/dotnet/runtime/issues/34132 --- src/pal/src/exception/signal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pal/src/exception/signal.cpp b/src/pal/src/exception/signal.cpp index 7e00483417..325a1501c7 100644 --- a/src/pal/src/exception/signal.cpp +++ b/src/pal/src/exception/signal.cpp @@ -689,7 +689,7 @@ PAL_ERROR InjectActivationInternal(CorUnix::CPalThread* pThread) { #ifdef INJECT_ACTIVATION_SIGNAL int status = pthread_kill(pThread->GetPThreadSelf(), INJECT_ACTIVATION_SIGNAL); - if (status != 0) + if ((status != 0) && (status != EAGAIN)) { // Failure to send the signal is fatal. There are only two cases when sending // the signal can fail. First, if the signal ID is invalid and second, @@ -958,4 +958,4 @@ void restore_signal_and_resend(int signal_id, struct sigaction* previousAction) { restore_signal(signal_id, previousAction); kill(gPID, signal_id); -} \ No newline at end of file +} -- cgit v1.2.3