From e6e78910af06f94f9510720684af9b5e1cab36f4 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 5 Dec 2015 00:31:49 +0100 Subject: [PATCH] src: use GetCurrentProcessId() for process.pid Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: https://github.com/nodejs/node/pull/4163 Reviewed-By: Brian White Reviewed-By: Colin Ihrig Reviewed-By: Rod Vagg --- src/node.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node.cc b/src/node.cc index 4e591ff5af..d8681292aa 100644 --- a/src/node.cc +++ b/src/node.cc @@ -68,9 +68,8 @@ #if defined(_MSC_VER) #include #include -#include #define strcasecmp _stricmp -#define getpid _getpid +#define getpid GetCurrentProcessId #define umask _umask typedef int mode_t; #else