Browse Source

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 <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
v5.x
Ben Noordhuis 9 years ago
committed by Rod Vagg
parent
commit
9e9346fa32
  1. 3
      src/node.cc

3
src/node.cc

@ -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

Loading…
Cancel
Save