Skip to content

Commit

Permalink
src: fix formatting of PIDs
Browse files Browse the repository at this point in the history
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 authored and targos committed Jul 24, 2018
1 parent bea1ee8 commit 4f8620e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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++) {
Expand Down
2 changes: 1 addition & 1 deletion src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 4f8620e

Please sign in to comment.