Commit 844f0a9f authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

src: fix sporadic deadlock in SIGUSR1 handler

Calling v8::Debug::DebugBreak() directly from the signal handler is
unsafe because said function tries to grab a mutex.  Work around that
by starting a watchdog thread that is woken up from the signal handler,
which then calls v8::Debug::DebugBreak().

Using a watchdog thread also removes the need to use atomic operations
so this commit does away with that.

Fixes: https://github.com/nodejs/node/issues/5368
PR-URL: https://github.com/nodejs/node/pull/5904


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent aa34b439
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment