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: nodejs#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 Michael Scovetta committed Apr 2, 2016
1 parent fddd7ea commit e91450e
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 e91450e

Please sign in to comment.