Commit 227790a3 authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 5.4.1~dfsg

parent 64025696
# Node.js ChangeLog
## 2016-01-12, Version 5.4.1 (Stable), @TheAlphaNerd
### Notable Changes
* Minor performance improvements:
- **module**: move unnecessary work for early return (Andres Suarez) [#3579](https://github.com/nodejs/node/pull/3579)
* Various bug fixes
* Various doc fixes
* Various test improvements
### Known issues
* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/node/issues/690)
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/node/issues/894)
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/node/issues/1435).
* Unicode characters in filesystem paths are not handled consistently across platforms or Node.js APIs. See [#2088](https://github.com/nodejs/node/issues/2088), [#3401](https://github.com/nodejs/node/issues/3401) and [#3519](https://github.com/nodejs/node/issues/3519).
### commits
* [[`ff539c5bb5`](https://github.com/nodejs/node/commit/ff539c5bb5)] - **cluster**: ignore queryServer msgs on disconnection (Santiago Gimeno) [#4465](https://github.com/nodejs/node/pull/4465)
* [[`00148b3de1`](https://github.com/nodejs/node/commit/00148b3de1)] - **deps**: backport 066747e from upstream V8 (Ali Ijaz Sheikh) [#4625](https://github.com/nodejs/node/pull/4625)
* [[`3912b5cbda`](https://github.com/nodejs/node/commit/3912b5cbda)] - **doc**: adds usage of readline line-by-line parsing (Robert Jefe Lindstaedt) [#4609](https://github.com/nodejs/node/pull/4609)
* [[`102fb7d3a1`](https://github.com/nodejs/node/commit/102fb7d3a1)] - **doc**: remove "above" and "below" references (Richard Sun) [#4499](https://github.com/nodejs/node/pull/4499)
* [[`df87176ae0`](https://github.com/nodejs/node/commit/df87176ae0)] - **doc**: update stylesheet to match frontpage (Roman Reiss) [#4621](https://github.com/nodejs/node/pull/4621)
* [[`ede98d1f98`](https://github.com/nodejs/node/commit/ede98d1f98)] - **doc**: stronger suggestion for userland assert (Wyatt Preul) [#4535](https://github.com/nodejs/node/pull/4535)
* [[`fdfc72c977`](https://github.com/nodejs/node/commit/fdfc72c977)] - **doc**: label http.IncomingMessage as a Class (Sequoia McDowell) [#4589](https://github.com/nodejs/node/pull/4589)
* [[`b181e26975`](https://github.com/nodejs/node/commit/b181e26975)] - **doc**: document http's server.listen return value (Sequoia McDowell) [#4590](https://github.com/nodejs/node/pull/4590)
* [[`97aaeb8519`](https://github.com/nodejs/node/commit/97aaeb8519)] - **doc**: fix description about the latest-codename (Minwoo Jung) [#4583](https://github.com/nodejs/node/pull/4583)
* [[`0126615d1e`](https://github.com/nodejs/node/commit/0126615d1e)] - **doc**: add Evan Lucas to Release Team (Evan Lucas) [#4579](https://github.com/nodejs/node/pull/4579)
* [[`ec73c69412`](https://github.com/nodejs/node/commit/ec73c69412)] - **doc**: add Myles Borins to Release Team (Myles Borins) [#4578](https://github.com/nodejs/node/pull/4578)
* [[`e703c9a4e2`](https://github.com/nodejs/node/commit/e703c9a4e2)] - **doc**: bring releases.md up to date (cjihrig) [#4540](https://github.com/nodejs/node/pull/4540)
* [[`ac1108d5e7`](https://github.com/nodejs/node/commit/ac1108d5e7)] - **doc**: add missing backtick for readline (Brian White) [#4549](https://github.com/nodejs/node/pull/4549)
* [[`09bc0c6a05`](https://github.com/nodejs/node/commit/09bc0c6a05)] - **doc**: improvements to crypto.markdown copy (James M Snell) [#4435](https://github.com/nodejs/node/pull/4435)
* [[`787c5d96bd`](https://github.com/nodejs/node/commit/787c5d96bd)] - **http**: remove variable redeclaration (Rich Trott) [#4612](https://github.com/nodejs/node/pull/4612)
* [[`145b66820f`](https://github.com/nodejs/node/commit/145b66820f)] - **module**: move unnecessary work for early return (Andres Suarez) [#3579](https://github.com/nodejs/node/pull/3579)
* [[`ffb7deb443`](https://github.com/nodejs/node/commit/ffb7deb443)] - **net**: remove hot path comment from connect (Evan Lucas) [#4648](https://github.com/nodejs/node/pull/4648)
* [[`799aa74d90`](https://github.com/nodejs/node/commit/799aa74d90)] - **net**: fix dns lookup for android (Josh Dague) [#4580](https://github.com/nodejs/node/pull/4580)
* [[`9accebe087`](https://github.com/nodejs/node/commit/9accebe087)] - **net, doc**: fix line wrapping lint in net.js (James M Snell) [#4588](https://github.com/nodejs/node/pull/4588)
* [[`37a546b490`](https://github.com/nodejs/node/commit/37a546b490)] - **src**: remove redeclarations of variables (Rich Trott) [#4605](https://github.com/nodejs/node/pull/4605)
* [[`b515ccc2a1`](https://github.com/nodejs/node/commit/b515ccc2a1)] - **stream**: remove useless if test in transform (zoubin) [#4617](https://github.com/nodejs/node/pull/4617)
* [[`ea6e26d904`](https://github.com/nodejs/node/commit/ea6e26d904)] - **test**: remove duplicate fork module import (Rich Trott) [#4634](https://github.com/nodejs/node/pull/4634)
* [[`b14b2aec5e`](https://github.com/nodejs/node/commit/b14b2aec5e)] - **test**: require common module only once (Rich Trott) [#4611](https://github.com/nodejs/node/pull/4611)
* [[`f28a640505`](https://github.com/nodejs/node/commit/f28a640505)] - **test**: only include http module once (Rich Trott) [#4606](https://github.com/nodejs/node/pull/4606)
* [[`6f9a96f497`](https://github.com/nodejs/node/commit/6f9a96f497)] - **test**: fix flaky unrefed timers test (Rich Trott) [#4599](https://github.com/nodejs/node/pull/4599)
* [[`b70eec8f7b`](https://github.com/nodejs/node/commit/b70eec8f7b)] - **tls_legacy**: do not read on OpenSSL's stack (Fedor Indutny) [#4624](https://github.com/nodejs/node/pull/4624)
## 2016-01-06, Version 5.4.0 (Stable), @Fishrock123
### Notable changes
......
......@@ -54,8 +54,8 @@ Binaries, installers, and source tarballs are available at
<https://nodejs.org/download/release/>, listed under their version strings.
The [latest](https://nodejs.org/download/release/latest/) directory is an
alias for the latest Stable release. The latest LTS release from an LTS
line is available in the form: latest-lts-_codename_. For example:
<https://nodejs.org/download/release/latest-lts-argon>
line is available in the form: latest-_codename_. For example:
<https://nodejs.org/download/release/latest-argon>
**Nightly** builds are available at
<https://nodejs.org/download/nightly/>, listed under their version
......@@ -444,6 +444,8 @@ Releases of Node.js and io.js will be signed with one of the following GPG keys:
* **Jeremiah Senkpiel** &lt;fishrock@keybase.io&gt; `FD3A5288F042B6850C66B31F09FE44734EB7990E`
* **James M Snell** &lt;jasnell@keybase.io&gt; `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1`
* **Rod Vagg** &lt;rod@vagg.org&gt; `DD8F2338BAE7501E3DD5AC78C273792F7D83545D`
* **Myles Borins** &lt;thealphanerd@keybase.io&gt; `792807C150954BF0299B289A38CE40DEEE898E15`
* **Evan Lucas** &lt;evanlucas@me.com&gt; `B9AE9905FFD7803F25714661B63B535A4C206CA9`
The full set of trusted release keys can be imported by running:
......@@ -454,6 +456,8 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF174
gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E
gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D
gpg --keyserver pool.sks-keyservers.net --recv-keys 792807C150954BF0299B289A38CE40DEEE898E15
gpg --keyserver pool.sks-keyservers.net --recv-keys B9AE9905FFD7803F25714661B63B535A4C206CA9
```
See the section above on [Verifying Binaries](#verifying-binaries) for
......
......@@ -1071,13 +1071,18 @@ class FastElementsAccessor
}
int num_used = 0;
for (int i = 0; i < backing_store->length(); ++i) {
if (!backing_store->is_the_hole(i)) ++num_used;
// Bail out early if more than 1/4 is used.
if (4 * num_used > backing_store->length()) break;
}
if (4 * num_used <= backing_store->length()) {
JSObject::NormalizeElements(obj);
if (!backing_store->is_the_hole(i)) {
++num_used;
// Bail out if a number dictionary wouldn't be able to save at least
// 75% space.
if (4 * SeededNumberDictionary::ComputeCapacity(num_used) *
SeededNumberDictionary::kEntrySize >
backing_store->length()) {
return;
}
}
}
JSObject::NormalizeElements(obj);
}
}
......
......@@ -12226,6 +12226,8 @@ static bool ShouldConvertToFastElements(JSObject* object,
uint32_t dictionary_size = static_cast<uint32_t>(dictionary->Capacity()) *
SeededNumberDictionary::kEntrySize;
// Turn fast if the dictionary only saves 50% space.
return 2 * dictionary_size >= *new_capacity;
}
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title> Node.js v5.4.0 Manual &amp; Documentation</title>
<title> Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="_toc" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -122,9 +122,6 @@
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Addons Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Addons Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="addons" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -1129,9 +1129,6 @@ const addon = require(&#39;./build/Release/addon&#39;);</code></pre>
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assert Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Assert Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="assert" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -97,10 +97,11 @@
<div id="apicontent">
<h1>Assert<span><a class="mark" href="#assert_assert" id="assert_assert">#</a></span></h1>
<pre class="api_stability_3">Stability: 3 - Locked</pre><p>The <code>assert</code> module provides a simple set of assertion tests that can be used
to test invariants and implement unit tests. While the <code>assert</code> module is
generally intended for internal use by Node.js itself, it can be used by user
code calling <code>require(&#39;assert&#39;)</code>.
<pre class="api_stability_3">Stability: 3 - Locked</pre><p>The <code>assert</code> module provides a simple set of assertion tests that can be used to
test invariants. The module is intended for internal use by Node.js, but can be
used in application code via <code>require(&#39;assert&#39;)</code>. However, <code>assert</code> is not a
testing framework, and is not intended to be used as a general purpose assertion
library.
</p>
<p>The API for the <code>assert</code> module is <a href="documentation.html#documentation_stability_index">Locked</a>. This means that there will be no
......@@ -458,9 +459,6 @@ constructor, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Gu
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -6,7 +6,7 @@
"name": "assert",
"stability": 3,
"stabilityText": "Locked",
"desc": "<p>The <code>assert</code> module provides a simple set of assertion tests that can be used\nto test invariants and implement unit tests. While the <code>assert</code> module is\ngenerally intended for internal use by Node.js itself, it can be used by user\ncode calling <code>require(&#39;assert&#39;)</code>.\n\n</p>\n<p>The API for the <code>assert</code> module is [Locked][]. This means that there will be no\nadditions or changes to any of the methods implemented and exposed by\nthe module.\n\n</p>\n",
"desc": "<p>The <code>assert</code> module provides a simple set of assertion tests that can be used to\ntest invariants. The module is intended for internal use by Node.js, but can be\nused in application code via <code>require(&#39;assert&#39;)</code>. However, <code>assert</code> is not a\ntesting framework, and is not intended to be used as a general purpose assertion\nlibrary.\n\n</p>\n<p>The API for the <code>assert</code> module is [Locked][]. This means that there will be no\nadditions or changes to any of the methods implemented and exposed by\nthe module.\n\n</p>\n",
"methods": [
{
"textRaw": "assert(value[, message]), assert.ok(value[, message])",
......
......@@ -2,10 +2,11 @@
Stability: 3 - Locked
The `assert` module provides a simple set of assertion tests that can be used
to test invariants and implement unit tests. While the `assert` module is
generally intended for internal use by Node.js itself, it can be used by user
code calling `require('assert')`.
The `assert` module provides a simple set of assertion tests that can be used to
test invariants. The module is intended for internal use by Node.js, but can be
used in application code via `require('assert')`. However, `assert` is not a
testing framework, and is not intended to be used as a general purpose assertion
library.
The API for the `assert` module is [Locked][]. This means that there will be no
additions or changes to any of the methods implemented and exposed by
......
......@@ -11,26 +11,28 @@ body {
font-size: 62.5%;
margin: 0;
padding: 0;
color: #3a3a3a;
background: #fcfefa;
color: #333;
background: #fff;
}
#content {
font-size: 1.8em;
}
a {
color: #FE5210;
a,
a:link,
a:active {
color: #80bd01;
text-decoration: none;
}
a:visited {
color: #FE7110;
border-radius: 2px;
padding: .1em .2em;
margin: -.1em 0;
}
a:hover,
a:focus {
color: #FFA158;
color: #fff;
background-color: #80bd01;
}
strong {
......@@ -170,7 +172,6 @@ dd + dt.pre {
}
h1, h2, h3, h4, h5, h6 {
color: #301004;
text-rendering: optimizeLegibility;
font-weight: 700;
position: relative;
......@@ -280,7 +281,7 @@ code.pre {
}
#intro a {
color: #333;
color: #ddd;
font-size: 1.25em;
font-weight: bold;
}
......@@ -296,7 +297,6 @@ hr {
}
#toc h2 {
color: #C73E09;
margin-top: 0;
font-size: 1.0em;
line-height: 0;
......@@ -339,12 +339,14 @@ p code,
li code {
font-size: 0.9em;
color: #040404;
background-color: #f2f5f0;
padding: 0.2em 0.4em;
background-color: #f0f0f0;
padding: .1em .2em;
border-radius: 2px;
}
a code {
color: inherit;
background: inherit;
}
span.type {
......@@ -360,12 +362,13 @@ span.type {
#column1.interior {
width: 702px;
border-left: 234px solid #f2f5f0;
margin-left: 234px;
padding-left: 2.0em;
}
#column2.interior {
width: 234px;
background: #333;
position: fixed;
height: 100%;
overflow-y: scroll;
......@@ -377,8 +380,8 @@ span.type {
bottom: 0;
left: 0;
width: 234px;
height: 5em;
background: linear-gradient(rgba(242,245,240, 0), rgba(242,245,240, 1));
height: 4em;
background: linear-gradient(rgba(242,245,240, 0), rgba(51, 51, 51, 1));
pointer-events: none;
}
......@@ -386,9 +389,9 @@ span.type {
list-style: none;
margin-left: 0em;
margin-top: 1.25em;
background: #f2f5f0;
background: #333;
margin-bottom: 0;
padding-bottom: 4em;
padding-bottom: 3em;
}
#column2 ul li {
......@@ -403,19 +406,24 @@ span.type {
}
#column2 ul li a {
color: #7a7a7a;
color: #ccc;
border-radius: 0;
}
#column2 ul li a.active {
color: #533;
border-bottom: 1px solid #533;
#column2 ul li a.active,
#column2 ul li a.active:hover,
#column2 ul li a.active:focus {
color: #80bd01;
border-radius: 0;
border-bottom: 1px solid #80bd01;
background: none;
}
#footer {
padding: 0;
min-height: 24px;
background: #333;
color: white;
#intro a:hover,
#column2 ul li a:hover,
#column2 ul li a:focus {
color: #fff;
background: none;
}
span > .mark,
......@@ -455,7 +463,7 @@ td > *:last-child {
font-size: 2.1em;
}
#column1.interior {
border-left: 0;
margin-left: 0;
padding-left: 0.5em;
padding-right: 0.5em;
width: auto;
......@@ -473,7 +481,7 @@ td > *:last-child {
font-size: 2.4em;
}
#column1.interior {
border-left: 0;
margin-left: 0;
padding-left: 0.5em;
padding-right: 0.5em;
width: auto;
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Buffer Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Buffer Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="buffer" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -1440,9 +1440,6 @@ has observed undue memory retention in their applications.
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Child Process Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Child Process Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="child_process" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -156,10 +156,9 @@ the event loop until the spawned process either exits of is terminated.
</p>
<p>For convenience, the <code>child_process</code> module provides a handful of synchronous
and asynchronous alternatives to <code>child_process.spawn()</code> and
<code>child_process.spawnSync()</code>, each of which are documented fully <a href="#child_process_asynchronous_process_creation">below</a>.
<em>Note that each of these alternatives are implemented on top of
<code>child_process.spawn()</code> or <code>child_process.spawnSync()</code>.</em>
and asynchronous alternatives to <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a> and
<a href="#child_process_child_process_spawnsync_command_args_options"><code>child_process.spawnSync()</code></a>. <em>Note that each of these alternatives are
implemented on top of <code>child_process.spawn()</code> or <code>child_process.spawnSync()</code>.</em>
</p>
<ul>
......@@ -361,7 +360,8 @@ const child = execFile(&#39;cat *.js bad_file | wc -l&#39;,
(Default: <code>process.execArgv</code>)</li>
<li><code>silent</code> <span class="type">Boolean</span> If true, stdin, stdout, and stderr of the child will be
piped to the parent, otherwise they will be inherited from the parent, see
the <code>&#39;pipe&#39;</code> and <code>&#39;inherit&#39;</code> options for [<code>spawn()</code>][]&#39;s <a href="#child_process_options_stdio"><code>stdio</code></a> for more details
the <code>&#39;pipe&#39;</code> and <code>&#39;inherit&#39;</code> options for [<code>spawn()</code>][]&#39;s <a href="#child_process_options_stdio"><code>stdio</code></a> for
more details
(default is false)</li>
<li><code>uid</code> <span class="type">Number</span> Sets the user identity of the process. (See setuid(2).)</li>
<li><code>gid</code> <span class="type">Number</span> Sets the group identity of the process. (See setgid(2).)</li>
......@@ -408,10 +408,10 @@ not clone the current process.</em>
<li><code>cwd</code> <span class="type">String</span> Current working directory of the child process</li>
<li><code>env</code> <span class="type">Object</span> Environment key-value pairs</li>
<li><code>stdio</code> <span class="type">Array|String</span> Child&#39;s stdio configuration. (See
<a href="#child_process_options_stdio">below</a>)</li>
<a href="#child_process_options_stdio"><code>options.stdio</code></a>)</li>
<li><code>detached</code> <span class="type">Boolean</span> Prepare child to run independently of its parent
process. Specific behavior depends on the platform, see
<a href="#child_process_options_detached">below</a>)</li>
<a href="#child_process_options_detached"><code>options.detached</code></a>)</li>
<li><code>uid</code> <span class="type">Number</span> Sets the user identity of the process. (See setuid(2).)</li>
<li><code>gid</code> <span class="type">Number</span> Sets the group identity of the process. (See setgid(2).)</li>
</ul>
......@@ -1144,9 +1144,6 @@ to the same value.
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -6,7 +6,7 @@
"name": "child_process",
"stability": 2,
"stabilityText": "Stable",
"desc": "<p>The <code>child_process</code> module provides the ability to spawn child processes in\na manner that is similar, but not identical, to [<code>popen(3)</code>][]. This capability\nis primarily provided by the <code>child_process.spawn()</code> function:\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst ls = spawn(&#39;ls&#39;, [&#39;-lh&#39;, &#39;/usr&#39;]);\n\nls.stdout.on(&#39;data&#39;, (data) =&gt; {\n console.log(`stdout: ${data}`);\n});\n\nls.stderr.on(&#39;data&#39;, (data) =&gt; {\n console.log(`stderr: ${data}`);\n});\n\nls.on(&#39;close&#39;, (code) =&gt; {\n console.log(`child process exited with code ${code}`);\n});</code></pre>\n<p>By default, pipes for <code>stdin</code>, <code>stdout</code> and <code>stderr</code> are established between\nthe parent Node.js process and the spawned child. It is possible to stream data\nthrough these pipes in a non-blocking way. <em>Note, however, that some programs\nuse line-buffered I/O internally. While that does not affect Node.js, it can\nmean that data sent to the child process may not be immediately consumed.</em>\n\n</p>\n<p>The <code>child_process.spawn()</code> method spawns the child process asynchronously,\nwithout blocking the Node.js event loop. The <code>child_process.spawnSync()</code>\nfunction provides equivalent functionality in a synchronous manner that blocks\nthe event loop until the spawned process either exits of is terminated.\n\n</p>\n<p>For convenience, the <code>child_process</code> module provides a handful of synchronous\nand asynchronous alternatives to <code>child_process.spawn()</code> and\n<code>child_process.spawnSync()</code>, each of which are documented fully [below][].\n<em>Note that each of these alternatives are implemented on top of\n<code>child_process.spawn()</code> or <code>child_process.spawnSync()</code>.</em>\n\n</p>\n<ul>\n<li><code>child_process.exec()</code>: spawns a shell and runs a command within that shell,\npassing the <code>stdout</code> and <code>stderr</code> to a callback function when complete.</li>\n<li><code>child_process.execFile()</code>: similar to <code>child_process.exec()</code> except that\nit spawns the command directly without first spawning a shell.</li>\n<li><code>child_process.fork()</code>: spawns a new Node.js process and invokes a\nspecified module with an IPC communication channel established that allows\nsending messages between parent and child.</li>\n<li><code>child_process.execSync()</code>: a synchronous version of\n<code>child_process.exec()</code> that <em>will</em> block the Node.js event loop.</li>\n<li><code>child_process.execFileSync()</code>: a synchronous version of\n<code>child_process.execFile()</code> that <em>will</em> block the Node.js event loop.</li>\n</ul>\n<p>For certain use cases, such as automating shell scripts, the\n[synchronous counterparts][] may be more convenient. In many cases, however,\nthe synchronous methods can have significant impact on performance due to\nstalling the event loop while spawned processes complete.\n\n</p>\n",
"desc": "<p>The <code>child_process</code> module provides the ability to spawn child processes in\na manner that is similar, but not identical, to [<code>popen(3)</code>][]. This capability\nis primarily provided by the <code>child_process.spawn()</code> function:\n\n</p>\n<pre><code>const spawn = require(&#39;child_process&#39;).spawn;\nconst ls = spawn(&#39;ls&#39;, [&#39;-lh&#39;, &#39;/usr&#39;]);\n\nls.stdout.on(&#39;data&#39;, (data) =&gt; {\n console.log(`stdout: ${data}`);\n});\n\nls.stderr.on(&#39;data&#39;, (data) =&gt; {\n console.log(`stderr: ${data}`);\n});\n\nls.on(&#39;close&#39;, (code) =&gt; {\n console.log(`child process exited with code ${code}`);\n});</code></pre>\n<p>By default, pipes for <code>stdin</code>, <code>stdout</code> and <code>stderr</code> are established between\nthe parent Node.js process and the spawned child. It is possible to stream data\nthrough these pipes in a non-blocking way. <em>Note, however, that some programs\nuse line-buffered I/O internally. While that does not affect Node.js, it can\nmean that data sent to the child process may not be immediately consumed.</em>\n\n</p>\n<p>The <code>child_process.spawn()</code> method spawns the child process asynchronously,\nwithout blocking the Node.js event loop. The <code>child_process.spawnSync()</code>\nfunction provides equivalent functionality in a synchronous manner that blocks\nthe event loop until the spawned process either exits of is terminated.\n\n</p>\n<p>For convenience, the <code>child_process</code> module provides a handful of synchronous\nand asynchronous alternatives to [<code>child_process.spawn()</code>][] and\n[<code>child_process.spawnSync()</code>][]. <em>Note that each of these alternatives are\nimplemented on top of <code>child_process.spawn()</code> or <code>child_process.spawnSync()</code>.</em>\n\n</p>\n<ul>\n<li><code>child_process.exec()</code>: spawns a shell and runs a command within that shell,\npassing the <code>stdout</code> and <code>stderr</code> to a callback function when complete.</li>\n<li><code>child_process.execFile()</code>: similar to <code>child_process.exec()</code> except that\nit spawns the command directly without first spawning a shell.</li>\n<li><code>child_process.fork()</code>: spawns a new Node.js process and invokes a\nspecified module with an IPC communication channel established that allows\nsending messages between parent and child.</li>\n<li><code>child_process.execSync()</code>: a synchronous version of\n<code>child_process.exec()</code> that <em>will</em> block the Node.js event loop.</li>\n<li><code>child_process.execFileSync()</code>: a synchronous version of\n<code>child_process.execFile()</code> that <em>will</em> block the Node.js event loop.</li>\n</ul>\n<p>For certain use cases, such as automating shell scripts, the\n[synchronous counterparts][] may be more convenient. In many cases, however,\nthe synchronous methods can have significant impact on performance due to\nstalling the event loop while spawned processes complete.\n\n</p>\n",
"modules": [
{
"textRaw": "Asynchronous Process Creation",
......@@ -414,16 +414,16 @@
"desc": "Environment key-value pairs"
},
{
"textRaw": "`stdio` {Array|String} Child's stdio configuration. (See [below](#child_process_options_stdio)) ",
"textRaw": "`stdio` {Array|String} Child's stdio configuration. (See [`options.stdio`][]) ",
"name": "stdio",
"type": "Array|String",
"desc": "Child's stdio configuration. (See [below](#child_process_options_stdio))"
"desc": "Child's stdio configuration. (See [`options.stdio`][])"
},
{
"textRaw": "`detached` {Boolean} Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [below](#child_process_options_detached)) ",
"textRaw": "`detached` {Boolean} Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [`options.detached`][]) ",
"name": "detached",
"type": "Boolean",
"desc": "Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [below](#child_process_options_detached))"
"desc": "Prepare child to run independently of its parent process. Specific behavior depends on the platform, see [`options.detached`][])"
},
{
"textRaw": "`uid` {Number} Sets the user identity of the process. (See setuid(2).) ",
......
......@@ -33,10 +33,9 @@ function provides equivalent functionality in a synchronous manner that blocks
the event loop until the spawned process either exits of is terminated.
For convenience, the `child_process` module provides a handful of synchronous
and asynchronous alternatives to `child_process.spawn()` and
`child_process.spawnSync()`, each of which are documented fully [below][].
*Note that each of these alternatives are implemented on top of
`child_process.spawn()` or `child_process.spawnSync()`.*
and asynchronous alternatives to [`child_process.spawn()`][] and
[`child_process.spawnSync()`][]. *Note that each of these alternatives are
implemented on top of `child_process.spawn()` or `child_process.spawnSync()`.*
* `child_process.exec()`: spawns a shell and runs a command within that shell,
passing the `stdout` and `stderr` to a callback function when complete.
......@@ -222,7 +221,8 @@ spawned directly as a new process making it slightly more efficient than
(Default: `process.execArgv`)
* `silent` {Boolean} If true, stdin, stdout, and stderr of the child will be
piped to the parent, otherwise they will be inherited from the parent, see
the `'pipe'` and `'inherit'` options for [`spawn()`][]'s [`stdio`][] for more details
the `'pipe'` and `'inherit'` options for [`spawn()`][]'s [`stdio`][] for
more details
(default is false)
* `uid` {Number} Sets the user identity of the process. (See setuid(2).)
* `gid` {Number} Sets the group identity of the process. (See setgid(2).)
......@@ -262,10 +262,10 @@ not clone the current process.*
* `cwd` {String} Current working directory of the child process
* `env` {Object} Environment key-value pairs
* `stdio` {Array|String} Child's stdio configuration. (See
[below](#child_process_options_stdio))
[`options.stdio`][])
* `detached` {Boolean} Prepare child to run independently of its parent
process. Specific behavior depends on the platform, see
[below](#child_process_options_detached))
[`options.detached`][])
* `uid` {Number} Sets the user identity of the process. (See setuid(2).)
* `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* return: {ChildProcess object}
......@@ -933,6 +933,7 @@ to the same value.
[`EventEmitters`]: events.html#events_class_events_eventemitter
[`net.Server`]: net.html#net_class_net_server
[`net.Socket`]: net.html#net_class_net_socket
[`options.detached`]: #child_process_options_detached
[`options.stdio`]: #child_process_options_stdio
[`stdio`]: #child_process_options_stdio
[below]: #child_process_asynchronous_process_creation
[synchronous counterparts]: #child_process_synchronous_process_creation
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cluster Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Cluster Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="cluster" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -830,9 +830,6 @@ the worker&#39;s unique id is the easiest way to find the worker.
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Console Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Console Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="console" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -304,9 +304,6 @@ formatted message and stack trace to the current position in the code.
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Debugger Node.js v5.4.0 Manual &amp; Documentation</title>
<title>Debugger Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="debugger" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -273,9 +273,6 @@ localhost:5858</li>
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>UDP / Datagram Sockets Node.js v5.4.0 Manual &amp; Documentation</title>
<title>UDP / Datagram Sockets Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -61,7 +61,7 @@
<div id="column1" data-id="dgram" class="interior">
<header>
<h1>Node.js v5.4.0 Documentation</h1>
<h1>Node.js v5.4.1 Documentation</h1>
<div id="gtoc">
<p>
<a href="index.html" name="toc">Index</a> |
......@@ -526,9 +526,6 @@ and <code>udp6</code> sockets). The bound address and port can be retrieved usin
</div>
</div>
</div>
<div id="footer">
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>DNS Node.js v5.4.0 Manual &amp; Documentation</title>
<title>DNS Node.js v5.4.1 Manual &amp; Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">