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:Anna Henningsen <anna@addaleax.net>
parent
aa34b439
Please register or sign in to comment