Skip to content

Commit

Permalink
report: use uv_pid_t instead of custom PID_TYPE
Browse files Browse the repository at this point in the history
PR-URL: #25597
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
  • Loading branch information
cjihrig authored and targos committed Jan 24, 2019
1 parent 213eddd commit c598d98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/node_report.cc
Expand Up @@ -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()) {
Expand Down Expand Up @@ -224,7 +223,7 @@ static void WriteNodeReport(Isolate* isolate,
Local<String> 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);
Expand Down
2 changes: 0 additions & 2 deletions src/node_report.h
Expand Up @@ -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

Expand Down

0 comments on commit c598d98

Please sign in to comment.