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: remove fixed-size GetHumanReadableProcessName · jigfox/node@3271c40

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • node_errors.cc
    • node_internals.h
    • util.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,11 @@ void AppendExceptionLine(Environment* env,
242242
}
243243

244244
[[noreturn]] void Assert(const AssertionInfo& info) {
245-
char name[1024];
246-
GetHumanReadableProcessName(&name);
245+
std::string name = GetHumanReadableProcessName();
247246

248247
fprintf(stderr,
249248
"%s: %s:%s%s Assertion `%s' failed.\n",
250-
name,
249+
name.c_str(),
251250
info.file_line,
252251
info.function,
253252
*info.function ? ":" : "",
Collapse file

‎src/node_internals.h‎

Copy file name to clipboardExpand all lines: src/node_internals.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ void SignalExit(int signal, siginfo_t* info, void* ucontext);
9797

9898
std::string GetProcessTitle(const char* default_title);
9999
std::string GetHumanReadableProcessName();
100-
void GetHumanReadableProcessName(char (*name)[1024]);
101100

102101
void InitializeContextRuntime(v8::Local<v8::Context>);
103102

Collapse file

‎src/util.cc‎

Copy file name to clipboardExpand all lines: src/util.cc
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,6 @@ std::string GetHumanReadableProcessName() {
161161
return SPrintF("%s[%d]", GetProcessTitle("Node.js"), uv_os_getpid());
162162
}
163163

164-
void GetHumanReadableProcessName(char (*name)[1024]) {
165-
// Leave room after title for pid, which can be up to 20 digits for 64 bit.
166-
char title[1000] = "Node.js";
167-
uv_get_process_title(title, sizeof(title));
168-
snprintf(*name, sizeof(*name), "%s[%d]", title, uv_os_getpid());
169-
}
170-
171164
std::vector<std::string> SplitString(const std::string& in, char delim) {
172165
std::vector<std::string> out;
173166
if (in.empty())

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.