Skip to content

Commit

Permalink
src: use GetCurrentProcessId() for process.pid
Browse files Browse the repository at this point in the history
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: #4163
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
bnoordhuis authored and Myles Borins committed Jan 19, 2016
1 parent 6f4ab1d commit 70974e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@
#if defined(_MSC_VER)
#include <direct.h>
#include <io.h>
#include <process.h>
#define strcasecmp _stricmp
#define getpid _getpid
#define getpid GetCurrentProcessId
#define umask _umask
typedef int mode_t;
#else
Expand Down

0 comments on commit 70974e9

Please sign in to comment.