Skip to content

Commit

Permalink
src: lock-free init_process_flags
Browse files Browse the repository at this point in the history
Fix #45152
  • Loading branch information
kapouer committed Oct 28, 2022
1 parent 2081082 commit d6147ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
1 change: 1 addition & 0 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ class MultiIsolatePlatform;
class InitializationResultImpl;

namespace ProcessFlags {
// TODO: 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.
Expand Down

0 comments on commit d6147ca

Please sign in to comment.