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 rvagg committed Dec 8, 2015
1 parent da6be4d commit 9e9346f
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 @@ -68,9 +68,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 9e9346f

Please sign in to comment.