Fixes a hang that can occur if a signal comes in during malloc calls.
authorChris Bieneman <beanz@apple.com>
Mon, 27 Apr 2015 20:45:35 +0000 (20:45 +0000)
committerChris Bieneman <beanz@apple.com>
Mon, 27 Apr 2015 20:45:35 +0000 (20:45 +0000)
commitdbaf039dde35606b295836381e71a5a69aef802e
tree3e2d42e547fd2d39d26d9d84b7e0165d70107ed0
parent445b1c78a577c8bacff25276e6de8e321c39dd63
Fixes a hang that can occur if a signal comes in during malloc calls.

We need to dereference the signals mutex during handler registration so that we force its construction. This is to prevent the first use being during handling an actual signal because you can't safely allocate memory in a signal handler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235914 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Unix/Signals.inc