src: use GetCurrentProcessId() for process.pid
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 4 Dec 2015 23:31:49 +0000 (00:31 +0100)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:19 +0000 (11:52 -0800)
commit70974e93624b702f6698e4839ef9cf51efd1b4e9
tree706692d7af776218c85d6b6e15f2d4af62a9fdf0
parent6f4ab1d1ab774f0f26b0fc2034d31d63838c8cea
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>
src/node.cc