Files
node/src
Ben Noordhuis 134a60c785 src: fix race condition in debug signal on exit
Before this commit, sending a SIGUSR1 at program exit could trigger a
hard to reproduce race condition where `v8::Debug::DebugBreak(isolate)`
got called when the isolate was in the process of being torn down.

A similar race condition is in theory possible when sending signals
to two threads simultaneously but I haven't been able to reproduce
that myself (and I tried, oh how I tried.)

This commit fixes the race condition by turning `node_isolate` into
a `std::atomic` and using it as an ad hoc synchronization primitive
in places where that is necessary.

A bare minimum std::atomic polyfill is added for OS X because Apple
wouldn't be Apple if things just worked out of the box.

PR-URL: https://github.com/nodejs/node/pull/3528
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-10-29 13:16:32 +11:00
..
2015-08-26 12:45:16 -07:00
2015-09-17 15:25:14 -05:00
2015-09-17 15:25:14 -05:00
2015-10-06 16:19:55 -05:00
2015-08-20 01:14:37 -07:00
2012-02-03 14:07:32 +00:00
2015-02-02 21:55:56 +01:00
2015-09-17 15:25:14 -05:00
2015-09-17 15:25:14 -05:00
2015-09-17 15:25:14 -05:00
2015-08-04 11:56:14 -07:00
2015-09-25 14:25:21 +02:00