Skip to content
Permalink
Browse files

src: fix formatting of PIDs

PR-URL: #21852
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
  • Loading branch information...
tniessen committed Jul 17, 2018
1 parent b2ac3af commit 8ac916309ba4382110427a94511b33fb13831bcf
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/env.cc
  2. +1 −1 src/util.cc
@@ -315,7 +315,7 @@ void Environment::PrintSyncTrace() const {
Local<v8::StackTrace> stack =
StackTrace::CurrentStackTrace(isolate(), 10, StackTrace::kDetailed);

fprintf(stderr, "(node:%u) WARNING: Detected use of sync API\n",
fprintf(stderr, "(node:%d) WARNING: Detected use of sync API\n",
uv_os_getpid());

for (int i = 0; i < stack->GetFrameCount() - 1; i++) {
@@ -115,7 +115,7 @@ std::string GetHumanReadableProcessName() {
void GetHumanReadableProcessName(char (*name)[1024]) {
char title[1024] = "Node.js";
uv_get_process_title(title, sizeof(title));
snprintf(*name, sizeof(*name), "%s[%u]", title, uv_os_getpid());
snprintf(*name, sizeof(*name), "%s[%d]", title, uv_os_getpid());
}

} // namespace node

0 comments on commit 8ac9163

Please sign in to comment.
You can’t perform that action at this time.