Though not a POSIX signal, SIGINFO is supported by BSD systems
(including Mac OS X) and is amongst the few signals that can be
triggered in a terminal via a simple key combination (CTRL-T).
On Linux, SIGINFO is an alias for SIGPWR; hence the defensive
conditionals in src/node.cc.
PR-URL: https://github.com/nodejs/node/pull/6093
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit improves module loading performance by at least ~25-35%
in the module-loader benchmarks.
Some optimization strategies include:
* Try-finally/try-catch isolation
* Replacing regular expressions with manual parsing
* Avoiding unnecessary string and array creation
* Avoiding constant recompilation of anonymous functions and
function definitions within functions
PR-URL: https://github.com/nodejs/node/pull/5172
Reviewed-By: James M Snell <jasnell@gmail.com>
V8 5.0 introduced a small modification for the unexpected end of input
error.
PR-URL: https://github.com/nodejs/node/pull/5945
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/6194
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Change the regular expression that recognizes “simple” JS expressions
to requiring that the full line needs to match it.
Previously, in terms like `a().b.`, `b.` would be a partial match.
This meant that completion would evaluate `b` and either fail with
a `ReferenceError` or, if `b` was some global, return the properties
of the global `b` object.
PR-URL: https://github.com/nodejs/node/pull/6192
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Original commit message:
tools: fix tickprocessor Cpp symbols on mac
Despite man page documentation:
-f Display the symbol table of a dynamic library flat (as one
file not separate modules).
`nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
does not seem to be required, so just remove it completely.
(For `-format` documentation - see `nm --help` on mac).
BUG=
Review URL: https://codereview.chromium.org/1840633002
Cr-Commit-Position: refs/heads/master@{#35445}
Fix: #5903
PR-URL: https://github.com/nodejs/node/pull/6179
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
os.userInfo() calls libuv's uv_os_get_passwd() function. It returns
an object containing the current effective user's username, uid,
gid, shell, and home directory. On Windows, the uid and gid are
-1, and the shell is null.
Refs: https://github.com/nodejs/node/issues/5582
PR-URL: https://github.com/nodejs/node/pull/6104
Reviewed-By: James M Snell <jasnell@gmail.com>
As Node.js expects either Python 2.6 or 2.7 installed to work properly,
simplejson module is no longer necessary. It was included in Python 2.6
as the json module.
PR-URL: https://github.com/nodejs/node/pull/6101
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
In 68990948fe (https://github.com/nodejs/node/pull/2325),
the conditions for increasing `readableState.awaitDrain` when
writing to a piping destination returns false were changed so
that they could not actually be met, effectively leaving
`readableState.awaitDrain` with a constant value of 0.
This patch changes the conditions to testing whether the
stream for which `.write()` returned false is still a piping
destination, which was likely the intention of the original
patch.
Fixes: https://github.com/nodejs/node/issues/5820
Fixes: https://github.com/nodejs/node/issues/5257
PR-URL: https://github.com/nodejs/node/pull/6023
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Currently we include instructions on how to check the sha of a
downloaded tar-ball, but do not include instruction on how to
get the `SHA256.txt` file. This has led to confusion with people
thinking that the SHA256.txt is included in that tarball.
This commit includes instructions on how to use curl to download the
`SHA256.txt` prior to the instructions on how to verify the sha.
Refs: https://github.com/nodejs/help/issues/113
Refs: https://github.com/nodejs/help/issues/137
PR-URL: https://github.com/nodejs/node/pull/6120
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit refines the documentation around child.kill(), where kill
attempts against shells will lead to unexpected results. Namely, on
linux the child process of a child process will not terminate, when
its parent gets terminated. This is different across the the
platforms.
PR-URL: https://github.com/nodejs/node/issues/2098
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Closes: https://github.com/nodejs/node/issues/2098
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).
PR-URL: https://github.com/nodejs/node/pull/5977
Fixes: https://github.com/nodejs/node/issues/5976
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Doc tool produces incomplete json when it meets unordered lists that
directly following a heading. Add a default case to processList function
to handle the lists.
PR-URL: https://github.com/nodejs/node/pull/5966
Fixes: https://github.com/nodejs/node/issues/1545
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Fixes an issue that prevented scrolling from going past large code
blocks on iOS devices. Also fixes a few minor styling issues that
came up in the discussion.
Fixes: https://github.com/nodejs/node/issues/5861
PR-URL: https://github.com/nodejs/node/pull/5878
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Adds additional `targetStart`, `targetEnd`, `sourceStart,
and `sourceEnd` arguments to `Buffer.prototype.compare`
to allow comparison of sub-ranges of two Buffers without
requiring Buffer.prototype.slice()
Fixes: https://github.com/nodejs/node/issues/521
PR-URL: https://github.com/nodejs/node/pull/5880
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This change was to add upon the algorithm description of path.format
by adding examples for unix systems that clarified behavior in
various scenarios.
PR-URL: https://github.com/nodejs/node/pull/5838
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
The only test with modifications is `test-stdin-child-proc` that was
passing when it should not because the exit code of the child process
was not being checked.
PR-URL: https://github.com/nodejs/node/pull/6087
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Rewriting npm shebang in install.py violates user expectations
among other things.
The shebang in npm.js is kept as #!/usr/bin/env node.
Fixes: https://github.com/nodejs/node/issues/6095
PR-URL: https://github.com/nodejs/node/pull/6098
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory. This would only work if
current working directory was also on the C: device. Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().
PR-URL: https://github.com/nodejs/node/pull/6067
Reviewed-By: Trott - Rich Trott <rtrott@gmail.com>
Reviewed-By: Joao Reis <reis@janeasystems.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Adds a new topic that provides an overview of the event loop, timers, and
`process.nextTick()` that is based upon a NodeSource "Need to Node" presentation
hosted by @trevnorris: Event Scheduling and the Node.js Event
Loop (https://nodesource.com/resources).
PR-URL: #4936
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Calvin W. Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an
in32_t. This caused slight differences in error message reported in edge
cases of argument parsing. Fixed by getting the IntegerValue() before
checking if the value is < 0. Added test of API that was affected.
PR-URL: https://github.com/nodejs/node/pull/6084
Reviewed-By: James M Snell <jasnell@gmail.com>
* use common.mustCall() to verify all tests have run
* eliminate unneeded removeTestFile()
* eliminate unneeded var leaking into global scope
* var -> const
* remove instance of let
PR-URL: https://github.com/nodejs/node/pull/6050
Reviewed-By: James M Snell <jasnell@gmail.com>
* due to: openssl bump in 1f434787fc
PR-URL: https://github.com/nodejs/node/pull/6065
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/6076
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This allows third-party tools to check whether or not a handle that
can be unreferenced is unreferenced at a particular time.
Notably, this should be helpful for inspection via AsyncWrap.
Also, this is useful even to node's internals, particularly timers.
Refs: https://github.com/nodejs/node/pull/5828
Refs: https://github.com/nodejs/node/pull/5827
PR-URL: https://github.com/nodejs/node/pull/5834
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
decipher.setAuthPadding canged to decipher.setAutoPadding
PR-URL: https://github.com/nodejs/node/pull/6041
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
The last change to this test landed before a nit about strict mode was
addressed, so this change addresses that.
PR-URL: https://github.com/nodejs/node/pull/6047
Refs: https://github.com/nodejs/node/pull/6017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Use HTML comments to reduce potential noise in github templates.
Also, improve flow of the pull request, making it easier to read.
PR-URL: https://github.com/nodejs/node/pull/5710
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>