pal_signal: add missing mutex unlock when SIGCHLD==SIG_IGN (dotnet/corefx#29843)
authorTom Deseyn <tom.deseyn@gmail.com>
Tue, 22 May 2018 13:02:59 +0000 (15:02 +0200)
committerStephen Toub <stoub@microsoft.com>
Tue, 22 May 2018 13:02:59 +0000 (09:02 -0400)
Child reapping was changed to be triggered by the SIGCHLD signal (https://github.com/dotnet/corefx/pull/26291).
As part of that change, code was added to handle the original handler being SIG_IGN.
In that case, there was a missing mutex unlock.

Fixes https://github.com/dotnet/corefx/issues/29841.

Commit migrated from https://github.com/dotnet/corefx/commit/50d6137962ca884acbdff43aebc1af0d2f13fb34

src/libraries/Native/Unix/System.Native/pal_signal.c

index 8378ca5..0cf57de 100644 (file)
@@ -146,6 +146,7 @@ static void* SignalHandlerLoop(void* arg)
                         } while (pid > 0);
                     }
                 }
+                pthread_mutex_unlock(&lock);
             }
 
             if (callback != NULL)