Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[squash] drop process title mutex
  • Loading branch information
addaleax committed May 6, 2018
commit 9b9d2a896add7300b9c14748997202e03e75ba4d
3 changes: 0 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ using v8::Value;

using AsyncHooks = Environment::AsyncHooks;

Mutex process_title_mutex;
static Mutex process_mutex;
static Mutex environ_mutex;

Expand Down Expand Up @@ -2608,7 +2607,6 @@ static void GetLinkedBinding(const FunctionCallbackInfo<Value>& args) {

static void ProcessTitleGetter(Local<Name> property,
const PropertyCallbackInfo<Value>& info) {
Mutex::ScopedLock lock(process_title_mutex);
char buffer[512];
uv_get_process_title(buffer, sizeof(buffer));
info.GetReturnValue().Set(String::NewFromUtf8(info.GetIsolate(), buffer));
Expand All @@ -2619,7 +2617,6 @@ static void ProcessTitleSetter(Local<Name> property,
Local<Value> value,
const PropertyCallbackInfo<void>& info) {
node::Utf8Value title(info.GetIsolate(), value);
Mutex::ScopedLock lock(process_title_mutex);
uv_set_process_title(*title);
}

Expand Down
3 changes: 0 additions & 3 deletions src/node_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ extern bool v8_initialized;
// Used in node_config.cc.
extern node::DebugOptions debug_options;

// Used to protect the process title in multi-threading situations.
extern Mutex process_title_mutex;

// Forward declaration
class Environment;

Expand Down
1 change: 0 additions & 1 deletion src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ std::string GetHumanReadableProcessName() {

void GetHumanReadableProcessName(char (*name)[1024]) {
char title[1024] = "Node.js";
Mutex::ScopedLock lock(process_title_mutex);
uv_get_process_title(title, sizeof(title));
snprintf(*name, sizeof(*name), "%s[%u]", title, uv_os_getpid());
}
Expand Down