GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: allow preventing debug signal handler start · nodejs/node@b228db5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • env-inl.h
    • env.h
    • inspector_agent.cc
    • node.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/env-inl.h‎

Copy file name to clipboardExpand all lines: src/env-inl.h
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,10 @@ inline bool Environment::no_global_search_paths() const {
691691
!options_->global_search_paths;
692692
}
693693

694+
inline bool Environment::should_start_debug_signal_handler() const {
695+
return (flags_ & EnvironmentFlags::kNoStartDebugSignalHandler) == 0;
696+
}
697+
694698
inline bool Environment::no_browser_globals() const {
695699
// configure --no-browser-globals
696700
#ifdef NODE_NO_BROWSER_GLOBALS
Collapse file

‎src/env.h‎

Copy file name to clipboardExpand all lines: src/env.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ class Environment : public MemoryRetainer {
803803
inline bool tracks_unmanaged_fds() const;
804804
inline bool hide_console_windows() const;
805805
inline bool no_global_search_paths() const;
806+
inline bool should_start_debug_signal_handler() const;
806807
inline bool no_browser_globals() const;
807808
inline uint64_t thread_id() const;
808809
inline worker::Worker* worker_context() const;
Collapse file

‎src/inspector_agent.cc‎

Copy file name to clipboardExpand all lines: src/inspector_agent.cc
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,11 @@ bool Agent::Start(const std::string& path,
717717
StartIoThreadAsyncCallback));
718718
uv_unref(reinterpret_cast<uv_handle_t*>(&start_io_thread_async));
719719
start_io_thread_async.data = this;
720-
// Ignore failure, SIGUSR1 won't work, but that should not block node start.
721-
StartDebugSignalHandler();
720+
if (parent_env_->should_start_debug_signal_handler()) {
721+
// Ignore failure, SIGUSR1 won't work, but that should not block node
722+
// start.
723+
StartDebugSignalHandler();
724+
}
722725

723726
parent_env_->AddCleanupHook([](void* data) {
724727
Environment* env = static_cast<Environment*>(data);
Collapse file

‎src/node.h‎

Copy file name to clipboardExpand all lines: src/node.h
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,11 @@ enum Flags : uint64_t {
657657
// This control is needed by embedders who may not want to initialize the V8
658658
// inspector in situations where one has already been created,
659659
// e.g. Blink's in Chromium.
660-
kNoCreateInspector = 1 << 9
660+
kNoCreateInspector = 1 << 9,
661+
// Controls where or not the InspectorAgent for this Environment should
662+
// call StartDebugSignalHandler. This control is needed by embedders who may
663+
// not want to allow other processes to start the V8 inspector.
664+
kNoStartDebugSignalHandler = 1 << 10
661665
};
662666
} // namespace EnvironmentFlags
663667

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.