Skip to content

Commit 9e9346f

Browse files
bnoordhuisrvagg
authored andcommitted
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: #4163 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent da6be4d commit 9e9346f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/node.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@
6868
#if defined(_MSC_VER)
6969
#include <direct.h>
7070
#include <io.h>
71-
#include <process.h>
7271
#define strcasecmp _stricmp
73-
#define getpid _getpid
72+
#define getpid GetCurrentProcessId
7473
#define umask _umask
7574
typedef int mode_t;
7675
#else

0 commit comments

Comments
 (0)