mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: lock-free init_process_flags
Fix https://github.com/nodejs/node/issues/45152 PR-URL: https://github.com/nodejs/node/pull/45221 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
1 parent
738144c311
commit
97547bcd14
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -429,7 +429,7 @@ void ResetSignalHandlers() {
|
||||
#endif // __POSIX__
|
||||
}
|
||||
|
||||
static std::atomic<uint64_t> init_process_flags = 0;
|
||||
static std::atomic<uint32_t> init_process_flags = 0;
|
||||
|
||||
static void PlatformInit(ProcessInitializationFlags::Flags flags) {
|
||||
// init_process_flags is accessed in ResetStdio(),
|
||||
|
||||
@@ -228,6 +228,8 @@ class MultiIsolatePlatform;
|
||||
class InitializationResultImpl;
|
||||
|
||||
namespace ProcessFlags {
|
||||
// TODO(addaleax): Switch to uint32_t to match std::atomic<uint32_t>
|
||||
// init_process_flags in node.cc
|
||||
enum Flags : uint64_t {
|
||||
kNoFlags = 0,
|
||||
// Enable stdio inheritance, which is disabled by default.
|
||||
|
||||
Reference in new issue
Block a user