From c598d989704d11057357a989c5f1055324c84945 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 20 Jan 2019 17:26:30 -0500 Subject: [PATCH] report: use uv_pid_t instead of custom PID_TYPE PR-URL: https://github.com/nodejs/node/pull/25597 Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann Reviewed-By: Denys Otrishko --- src/node_report.cc | 5 ++--- src/node_report.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/node_report.cc b/src/node_report.cc index bb4c4e1a3a8e24..f5035d46281d07 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -107,9 +107,8 @@ std::string TriggerNodeReport(Isolate* isolate, // Obtain the current time and the pid (platform dependent) TIME_TYPE tm_struct; - PID_TYPE pid; LocalTime(&tm_struct); - pid = uv_os_getpid(); + uv_pid_t pid = uv_os_getpid(); // Determine the required report filename. In order of priority: // 1) supplied on API 2) configured on startup 3) default generated if (!name.empty()) { @@ -224,7 +223,7 @@ static void WriteNodeReport(Isolate* isolate, Local stackstr, TIME_TYPE* tm_struct) { std::ostringstream buf; - PID_TYPE pid = uv_os_getpid(); + uv_pid_t pid = uv_os_getpid(); // Save formatting for output stream. std::ios old_state(nullptr); diff --git a/src/node_report.h b/src/node_report.h index c64b9c9a20c116..4c29c13afc3670 100644 --- a/src/node_report.h +++ b/src/node_report.h @@ -32,11 +32,9 @@ namespace report { #ifdef _WIN32 typedef SYSTEMTIME TIME_TYPE; -typedef DWORD PID_TYPE; #define PATHSEP "\\" #else // UNIX, OSX typedef struct tm TIME_TYPE; -typedef pid_t PID_TYPE; #define PATHSEP "/" #endif