From 8ac916309ba4382110427a94511b33fb13831bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 17 Jul 2018 16:49:59 +0200 Subject: [PATCH] src: fix formatting of PIDs PR-URL: https://github.com/nodejs/node/pull/21852 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Jon Moss --- src/env.cc | 2 +- src/util.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/env.cc b/src/env.cc index 8362ce85c78cd2..769676275b25f0 100644 --- a/src/env.cc +++ b/src/env.cc @@ -315,7 +315,7 @@ void Environment::PrintSyncTrace() const { Local 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++) { diff --git a/src/util.cc b/src/util.cc index 77824acb03a610..3e808e13fe87d8 100644 --- a/src/util.cc +++ b/src/util.cc @@ -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