summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Balykov/Platform Lab /SRR/Staff Engineer/Samsung Electronics <g.balykov@samsung.com>2022-01-18 00:35:55 +0300
committer조웅석/Common Platform Lab(SR)/삼성전자 <ws77.cho@samsung.com>2022-02-17 11:36:03 +0900
commitf7aaa9594e188dc4dd04a4ce3d5329d9753efa2f (patch)
treea050c37dd5c7edd3f99299dafad5fa25e7256b65
parent1b285d5ace0c04bafe0141d0d33af2b3c8524469 (diff)
downloadcoreclr-f7aaa9594e188dc4dd04a4ce3d5329d9753efa2f.tar.gz
coreclr-f7aaa9594e188dc4dd04a4ce3d5329d9753efa2f.tar.bz2
coreclr-f7aaa9594e188dc4dd04a4ce3d5329d9753efa2f.zip
[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
-rw-r--r--src/pal/src/exception/signal.cpp4
1 files 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
+}