0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
Commit Graph

12712 Commits

Author SHA1 Message Date
Arthur Gautier
671347cf13 doc: fixup socket.remoteAddress
remoteAddress may be undefined under certain conditions

Signed-off-by: Arthur Gautier <baloo@gandi.net>

PR-URL: https://github.com/nodejs/node/pull/4198
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-12-14 17:25:36 +11:00
Fedor Indutny
acef181fde https: support disabling session caching
Zero value of `maxCachedSessions` should disable TLS session caching in
`https.Agent`

PR-URL: https://github.com/nodejs/node/pull/4252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-12-12 12:48:29 -05:00
Rich Trott
f050cab3d8 doc: copyedit console doc
PR-URL: https://github.com/nodejs/node/pull/4225
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 21:19:57 -08:00
Fedor Indutny
c5b4f6bc99 tls: introduce secureContext for tls.connect
Add `secureContext` option to `tls.connect`. It is useful for caching
client certificates, key, and CA certificates.

PR-URL: https://github.com/nodejs/node/pull/4246
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 19:53:30 -05:00
Julien Gilli
425a3545d2 domains: fix handling of uncaught exceptions
Fix node exiting due to an exception being thrown rather than emitting
an `'uncaughtException'` event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an `'uncaughtException'` event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and `--abort-on-uncaught-exception` is used.

Finally, change the behavior of --abort-on-uncaught-exception so that,
if the domain within which the error is thrown has no error handler, but
a domain further up the domains stack has one, the process will not
abort.

Fixes #3607 and #3653.

PR: #3654
PR-URL: https://github.com/nodejs/node/pull/3654
Reviewed-By: Chris Dickinson <chris@neversaw.us>
2015-12-11 14:33:48 -08:00
janriemer
1a21a5368b doc: move description of 'equals' method to right place
the description of buffer.equals(otherBuffer) was at the wrong
place; move it underneath the method signature

PR-URL: https://github.com/nodejs/node/pull/4227
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-11 10:40:56 -08:00
Tom Gallacher
9a9c5259bf doc: Fixing broken links to the v8 wiki
PR-URL: https://github.com/nodejs/node/pull/4241
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-11 10:24:46 -08:00
Prince J Wesley
aad6b9f0eb repl: display error message when loading directory
When loading directory instead of file, no error message
is displayed. It's good to display error message for
this scenario.

PR-URL: https://github.com/nodejs/node/pull/4170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-11 10:21:14 +09:00
Alexander Martin
67e181986a buffer: add includes() for parity with TypedArray
Add Buffer#includes() by wrapping an indexOf and performing a strict
equals check to -1.

The includes method takes the search value, byteOffset, and encoding as
arguments.

The test is a modified version of the indexOf test.

Fixes: https://github.com/nodejs/node/issues/3552
PR-URL: https://github.com/nodejs/node/pull/3567
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-10 13:41:40 -07:00
Santiago Gimeno
23e7703c85 test: fix http-many-ended-pipelines flakiness
It can happen that the HTTP connection is closed before the server has received
all the requests, thus the server close condition is never reached. To solve
this, close the server when the socket is fully closed.

PR-URL: https://github.com/nodejs/node/pull/4041
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-12-10 10:23:21 -06:00
Jörg Krause
84dea1bd0c configure: fix arm vfpv2
The gcc -mfpu flag for VFPv2 is vfp, not vfpv2 (there is no vfpv2) [1].

[1] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

PR-URL: https://github.com/nodejs/node/pull/4203
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-12-10 14:45:01 +01:00
Santiago Gimeno
3b94991bda test: fix tls-inception flakiness
When sending a very large buffer (400000 bytes) the test fails due to
the client socket from the `a` server erroring with `ECONNRESET`.
There's a race condition between the closing of this socket and the `ssl`
socket closing on the other side of the connection. To improve things,
destroy the socket as soon as possible: in the `end` event of the `dest`
socket.

PR-URL: https://github.com/nodejs/node/pull/4195
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-12-10 03:53:24 -05:00
Santiago Gimeno
86a3bd09b0 test: fix tls-inception
Make sure all the data is read before checking its validity.
Remove `gotHello` variable and just check that the ssl `end` event
is received.
Remove unused variables.

PR-URL: https://github.com/nodejs/node/pull/4195
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-12-10 03:52:51 -05:00
Rich Trott
37ed05b8c1 doc: copyedit child_process doc
PR-URL: https://github.com/nodejs/node/pull/4188
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-09 16:56:26 -08:00
Rich Trott
e47ae5808b doc: copyedit buffer doc
PR-URL: https://github.com/nodejs/node/pull/4187
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-09 16:49:04 -08:00
Rich Trott
70fb06a90b doc: clarify assert.fail doc
PR-URL: https://github.com/nodejs/node/pull/4186
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-09 16:43:48 -08:00
Rich Trott
e3187cc81e doc: copyedit addons doc
PR-URL: https://github.com/nodejs/node/pull/4185
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-12-09 16:37:13 -08:00
Ben Noordhuis
213ede6cee repl: fix require('3rdparty') regression
Fix module loading of third-party modules in the REPL by inheriting
module.paths from the REPL's parent module.

Commit ee72ee7 ("module,repl: remove repl require() hack") introduced
a regression where require() of modules in node_modules directories
no longer worked in the REPL (and fortunately only in the REPL.)
It turns out we didn't have test coverage for that but we do now.

Fixes: https://github.com/nodejs/node/issues/4208
PR-URL: https://github.com/nodejs/node/pull/4215
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-09 23:30:02 +01:00
Calvin Metcalf
931ab967ff doc: add calvinmetcalf to collaborators
PR-URL: https://github.com/nodejs/node/pull/4218
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2015-12-09 14:10:01 -08:00
Matteo Collina
01ce23148b doc: add mcollina to collaborators
Hello everyone!

PR-URL: https://github.com/nodejs/node/pull/4220
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
2015-12-09 14:08:06 -08:00
Ryan Graham
bd8753aabf doc: add rmg to collaborators
PR-URL: https://github.com/nodejs/node/pull/4219
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
2015-12-09 14:00:03 -08:00
Ben Noordhuis
73a9a6fc92 doc: harmonize description of ca argument
Different sections said different things about what the `ca` argument
should look like.  This commit harmonizes them.

Ref: https://github.com/nodejs/node/pull/4099
PR-URL: https://github.com/nodejs/node/pull/4213
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-09 22:29:37 +01:00
Ben Noordhuis
1e89830a11 test: don't assume openssl s_client supports -ssl3
Scan the child process's stderr for an 'unknown flag' error message and
mark the test as skipped if found.

Fixes: https://github.com/nodejs/node/issues/3927
PR-URL: https://github.com/nodejs/node/pull/4204
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-12-09 20:16:09 +01:00
Rich Trott
da5cdc2207 assert: accommodate ES6 classes that extend Error
`assert.throws()` and `assert.doesNotThrow()` blow up with a `TypeError`
if used with an ES6 class that extends Error.

Fixes: https://github.com/nodejs/node/issues/3188
PR-URL: https://github.com/nodejs/node/pull/4166
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-12-09 09:05:20 -08:00
Roman Klauke
dfc8bedbc5 doc: change references from node to Node.js
Some API doc referenced Node.js with "node" or "node.js". This commit
replaces these references.

PR-URL:https://github.com/nodejs/node/pull/4177
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-10 00:09:38 +09:00
João Reis
a7f5dfd14c configure: use __ARM_ARCH to determine arm version
Before this change, configure used processor specific macro defines
(like __ARM_ARCH_6M__) to detect the arm processor version. This
changes configure to use __ARM_ARCH, that should be defined to the
correct version.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/4123
2015-12-09 14:59:25 +00:00
João Reis
0e3912be0b configure: respect CC_host in host arch detection
When cross compiling, GYP uses the variables CC_host and CXX_host to
find the host compiler, if they are defined. This ensures that
variable is used, if defined, when detecting the host architecture.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4117
2015-12-09 14:48:59 +00:00
Rod Vagg
6ca5ea3860 2015-12-09, Version 5.2.0 (Stable)
Notable changes:

* build:
  - Add support for Intel's VTune JIT profiling when compiled with
    --enable-vtune-profiling. For more information about VTune, see
    https://software.intel.com/en-us/node/544211. (Chunyang Dai) #3785.
  - Properly enable V8 snapshots by default. Due to a configuration
    error, snapshots have been kept off by default when the intention
    is for the feature to be enabled. (Fedor Indutny) #3962.
* crypto:
  - Simplify use of ECDH (Elliptic Curve Diffie-Hellman) objects
    (created via crypto.createECDH(curve_name)) with private keys that
    are not dynamically generated via generateKeys(). The public key
    is now computed when explicitly setting a private key. Added
    validity checks to reduce the possibility of computing weak or
    invalid shared secrets. Also, deprecated the setPublicKey() method
    for ECDH objects as its usage is unnecessary and can lead to
    inconsistent state. (Michael Ruddy) #3511.
  - Update root certificates from the current list stored maintained
    by Mozilla NSS. (Ben Noordhuis) #3951.
  - Multiple CA certificates can now be passed with the ca option to
    TLS methods as an array of strings or in a single new-line
    separated string. (Ben Noordhuis) #4099
* tools: Include a tick processor in core, exposed via the
  --prof-process command-line argument which can be used to process V8
  profiling output files generated when using the --prof command-line
  argument. (Matt Loring) #4021.

PR-URL: https://github.com/nodejs/node/pull/4181
2015-12-09 16:22:19 +11:00
wurde
a1388bb545 doc: add brief Node.js overview to README
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/4174
2015-12-08 15:47:48 -08:00
Ben Noordhuis
82e0974afa tls: support reading multiple cas from one input
Before this commit you had to pass multiple CA certificates as an array
of strings.  For convenience you can now pass them as a single string.

Fixes: https://github.com/nodejs/node/issues/4096
PR-URL: https://github.com/nodejs/node/pull/4099
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-08 22:01:46 +01:00
Ben Noordhuis
813e73e1f5 tools: list missing whitespace/if-one-line cpplint
Writing `// NOLINT(whitespace/if-one-line)` was not possible because the
directive was not listed in the list of known lint rules.  You can now.

PR-URL: https://github.com/nodejs/node/pull/4099
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-08 22:01:41 +01:00
Rod Vagg
b47d82316c src: refactor vcbuild configure args creation
remove a bunch of variables and rely on %configure_flags% where
possible, also allow for an external %config_flags% variable to supply
additional arguments to configure to match the behaviour of the Makefile

PR-URL: https://github.com/nodejs/node/pull/3399
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-12-08 20:42:31 +11:00
Fedor Indutny
c0cb80ec3b tls_wrap: slice buffer properly in ClearOut
Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.

Fix: https://github.com/nodejs/node/issues/4161
PR-URL: https://github.com/nodejs/node/pull/4184
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-12-08 00:18:43 -05:00
Matt Loring
49440b7ea2 tools: add --prof-process flag to node binary
This change cleans up outstanding comments on #3032. It improves error
handling when no isolate file is provided and adds the --prof-process
flag to the node binary which executes the tick processor on the
provided isolate file.

PR-URL: https://github.com/nodejs/node/pull/4021
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-12-08 02:00:46 +01:00
Sakthipriyan Vairamani
a04721df66 test: check range fix for slowToString
Verify that start and end are coerced properly.

Ref: https://github.com/nodejs/node/pull/2919
PR-URL: https://github.com/nodejs/node/pull/4019
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-12-07 16:53:48 -07:00
Matt Loring
ec836547c4 buffer: fix range checking for slowToString
If `start` is not a valid number in the range, then the default value
zero will be used. Same way, if `end` is not a valid number in the
accepted range, then, by default, the length of the buffer is assumed.

Fixes: https://github.com/nodejs/node/issues/2668
Ref: https://github.com/nodejs/node/pull/2919
PR-URL: https://github.com/nodejs/node/pull/4019
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-12-07 16:52:53 -07:00
Rod Vagg
d2c8ba5248 node: s/doNTCallbackX/nextTickCallbackWithXArgs/
Rename doNTCallback functions for clarity when profiling, these make
sense internally but the "NT" in particular is a bit obtuse to be
immediately understandable by non-core developers.

PR-URL: https://github.com/nodejs/node/pull/4167
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-07 23:44:26 +09:00
Michael Ruddy
322b36c0a1 crypto: simplify using pre-existing keys with ECDH
These changes simplify using ECDH with private keys that are not
dynamically generated with ECDH.generateKeys.

Support for computing the public key corresponding to the given private
key was added. Validity checks to reduce the possibility of computing
a weak or invalid shared secret were also added.

Finally, ECDH.setPublicKey was softly deprecated.

PR-URL: https://github.com/nodejs/node/pull/3511
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-12-07 12:44:46 +01:00
Rafał Pocztarski
19e06d71cf test: skip long path tests on non-Windows
If not running on Windows it skips the long path tests in:

* test-fs-long-path.js
* test-require-long-path.js

Fixes: https://github.com/nodejs/node/issues/2255
PR-URL: https://github.com/nodejs/node/pull/4116
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-07 12:10:24 +01:00
Super Zheng
95dd890b32 build: add "--partly-static" build options
A lot of machines don't upgrade libstdc++.so library for a long time,
but the new version of node requires the latest GLIBCXX.

Using "--fully-static" configurable options may resolve this problem,
but the side effect is that the size of the executable file will be
increased.

Adding "--partly-static" configurable options it will only build
libgcc and libstdc++ libraries into executable file, resolve the
problem and control the size of file.

PR-URL: https://github.com/nodejs/node/pull/4152
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-07 12:05:53 +01:00
Santiago Gimeno
dde2012cfa test: don't check the # of chunks in test-http-1.0
As it can happen that the HTTP response is received in more than
one TCP chunk.

PR-URL: https://github.com/nodejs/node/pull/3961
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-07 11:41:27 +01:00
Fedor Indutny
de2fd63612 stream_wrap: error if stream has StringDecoder
If `.setEncoding` was called on input stream - all emitted `data` will
be `String`s instances, not `Buffer`s. This is unacceptable for
`StreamWrap`, and should not lead to the crash.

Fix: https://github.com/nodejs/node/issues/3970
PR-URL: https://github.com/nodejs/node/pull/4031
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-06 21:55:25 -05:00
Rich Trott
afd512253d test: mark test-cluster-shared-leak flaky
test-cluster-shared-leak is flaky on Windows.

Refs: https://github.com/nodejs/node/issues/3956

PR-URL: https://github.com/nodejs/node/pull/4162
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-06 19:18:03 +01:00
yorkie
8c35903ba3 fs,doc: use target instead of destination
PR-URL: https://github.com/nodejs/node/pull/3912
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-05 18:25:05 -08:00
fansworld-claudio
2a29b70b37 doc: url.format - true slash postfix behaviour
Change url.format's references to slash postfixing to reflect
true behaviour (it only automatically postfixes slashes to the
slashedProtocols when host is present).

Fixes: #3361

PR-URL: https://github.com/nodejs/node/pull/4119
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-06 09:02:55 +09:00
Santiago Gimeno
f8cf9474ce test: fix cluster-worker-isdead
Check if the worker 'isDead' instead of 'isConnected' as the
'disconnect' event is not guaranteed to be received before the
'exit' event.
Remove the 'net' dependency as it is not used.

PR-URL: https://github.com/nodejs/node/pull/3954
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-06 08:46:28 +09:00
Bryce Baril
7239494b54 buffer: Prevent Buffer constructor deopt
The Buffer constructor will generally get inlined, but any call to the Buffer
constructor for a string without encoding will cause an eager deoptimization
of any function that inlined the Buffer constructor. This is due to a an
out-of-bounds read on `arguments[1]`. This change prevents that deopt.

PR-URL: https://github.com/nodejs/node/pull/4158
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-06 08:28:06 +09:00
Ali Ijaz Sheikh
e2dec98837 deps: upgrade to V8 4.7.80.25
Pick up the latest patch-level from V8 stable. This includes the following fix:

* c408ea72bf
  Make AstRawString deduplication encoding-agnostic.

  BUG=v8:4450
  LOG=N
  R=hablich@chromium.org
  TBR=hablich@chromium.org

  Review URL: https://codereview.chromium.org/1494293003

See also: https://github.com/nodejs/node/pull/4128

PR-URL: https://github.com/nodejs/node/pull/4160
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
2015-12-05 08:38:30 -08:00
cjihrig
1ec09b0449 src: don't print garbage errors
If JS throws an object whose toString() method throws, then Node
attempts to print an empty message, but actually prints garbage.
This commit checks for this case, and prints a message instead.

Fixes: https://github.com/nodejs/node/issues/4079
PR-URL: https://github.com/nodejs/node/pull/4112
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-05 11:15:49 -05:00
Ben Noordhuis
e6e78910af 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>
2015-12-05 17:12:57 +01:00