From 4f8620e2b79220b65e8e16c4ef3c531ecfc84478 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 fffe5d61d0685a..76d1b6dd86d43e 100644 --- a/src/env.cc +++ b/src/env.cc @@ -306,7 +306,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