0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00
Commit Graph

2035 Commits

Author SHA1 Message Date
Italo A. Casas
53178f908f doc: link SIGTSTP / SIGCONT events in readline doc
PR-URL: https://github.com/nodejs/node/pull/8475
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-09-13 12:53:17 +02:00
yorkie
ebaa69baf6 doc: fix link on timers.md
PR-URL: https://github.com/nodejs/node/pull/8488
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-11 21:35:31 -07:00
Luigi Pinca
cfe8278328 doc: add added: information for crypto
PR-URL: https://github.com/nodejs/node/pull/8281
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-11 21:08:31 -07:00
Franziska Hinkelmann
73b0182553 doc: fix example in repl documentation
Define the context property r.context.m, not r.m.

PR-URL: https://github.com/nodejs/node/pull/8469
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-11 20:56:12 -07:00
Anna Henningsen
3207ea4e36 doc: note that listening on SIGSEGV & co is unsafe
Note that trying to listen for some signals using `process.on()`
is unsafe in the `process` docs.

PR-URL: https://github.com/nodejs/node/pull/8410
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-11 20:48:35 -07:00
Bartosz Sosnowski
b90f3da9de
child_process, win: fix shell spawn with AutoRun
Under Windows system can be configured to execute a specific command
each time a shell is spawned. Under some conditions this breaks the
way node handles shell scripts under windows.
This commit adds /d switch to spawn and spawnSync which disables this
AutoRun functionality.

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/25458
PR-URL: https://github.com/nodejs/node/pull/8063
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-09-09 20:51:43 +02:00
Prince J Wesley
a634554fca
readline: key interval delay for \r & \n
Emit two line events when there is a delay between
CR('\r') and LF('\n').

Introduced a new option `crlfDelay`. If the delay between \r and \n
exceeds `crlfDelay` milliseconds, both \r and \n will be treated as
separate end-of-line input. Default to 100 milliseconds.
`crlfDelay` will be coerced to [100, 2000] range.

PR-URL: https://github.com/nodejs/node/pull/8109
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-09-08 20:16:39 +05:30
not-an-aardvark
079acccb56 crypto: add crypto.timingSafeEqual()
Reinstate crypto.timingSafeEqual() which was reverted due to test
issues. The flaky test issues are resolved in this new changeset.

PR-URL: https://github.com/nodejs/node/pull/8304
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-09-07 16:29:41 -07:00
Anna Henningsen
983775d457
events: make memory leak warning name more verbose
Switch from a generic `Warning` to the more specific
`MaxListenersExceededWarning`.

Ref: https://github.com/nodejs/node/pull/8298
PR-URL: https://github.com/nodejs/node/pull/8341
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-09-04 17:11:59 +02:00
Mike Ralphson
7e8d994e33 doc: add return type of clientRequest.setTimeout
Refs: https://github.com/nodejs/node/pull/1699
PR-URL: https://github.com/nodejs/node/pull/8356
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-09-03 09:25:06 +02:00
Mike Ralphson
3905f48882
doc: fix typos
PR-URL: https://github.com/nodejs/node/pull/8370
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-09-02 23:49:54 +02:00
Brian White
8361c26cd5
doc: fix broken link in dgram doc
PR-URL: https://github.com/nodejs/node/pull/8365
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-09-02 14:29:30 -04:00
Dan Fabulich
143d38c650 doc: bad/better examples for fs.access() and fs.exists()
PR-URL: https://github.com/nodejs/node/pull/7832
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-09-01 08:22:00 -07:00
Hubert Mine
f7dd3bc19f doc: fix typo in stream doc
PR-URL: https://github.com/nodejs/node/pull/8326
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-09-01 07:22:03 +02:00
James M Snell
86067f0129 doc: clarify that path on windows accepts / and \
Fixes: https://github.com/nodejs/node/issues/6520
PR-URL: https://github.com/nodejs/node/pull/8291
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-30 12:29:47 -07:00
Anna Henningsen
932c824c60
events: make memory leak warning more accessible
This makes the famous `EventEmitter memory leak` warnings occurring
when the listener count for a given event exceeds a specified number
more programatically accessible, by giving them properties referring
to the event emitter instance and the event itself.

This can be useful for debugging the origins of such a warning when
the stack itself doesn’t reveal enough information about the event
emitter instance itself, e.g. when manual inspection of the
already-registered listeners is expected to be useful.

PR-URL: https://github.com/nodejs/node/pull/8298
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <Fishrock123@rocketmail.com>
2016-08-30 17:02:51 +02:00
Brian White
2cc7fa5e7d
http: remove deprecated Client interface
PR-URL: https://github.com/nodejs/node/pull/8104
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-29 21:44:58 -04:00
James M Snell
488d37b3dc doc: doc that listen can be called multiple times
Fixes: https://github.com/nodejs/node/issues/4646
PR-URL: https://github.com/nodejs/node/pull/8294
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-29 15:32:32 -07:00
James M Snell
61fa50d298 doc: readline write() is processed as input
Fixes: https://github.com/nodejs/node/issues/4402
PR-URL: https://github.com/nodejs/node/pull/8295
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-29 15:29:59 -07:00
James M Snell
f10e1ed455 doc: 'ipc' is required with fork stdio option
Fixes: https://github.com/nodejs/node/issues/8167
PR-URL: https://github.com/nodejs/node/pull/8290
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-08-29 15:20:35 -07:00
Sakthipriyan Vairamani
c8619ea3c3
doc: improve fs.truncate functions' documentation
The default value of the `len` parameter is zero and it is included in
the documenetation.

This patch also has examples of how `ftruncate` can be used.

PR-URL: https://github.com/nodejs/node/pull/7648
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-27 19:51:20 +05:30
Luigi Pinca
df4880de55
doc: add added: information for modules
PR-URL: https://github.com/nodejs/node/pull/8250
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-27 16:19:26 +02:00
Zwb
a72a331536 doc: fix onReadable reentry after unshift called
In example parseHeader, stream listen **readable** event,
if call stream.unshift(buf) before stream.removeListener('readable',
onReadable), readable event will be emited before removeListener,
so callback will not been called correctlly.
After change to
```js
stream.removeListener('error', callback);
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
```
It solves this problem.

PR-URL: https://github.com/nodejs/node/pull/8200
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-26 21:59:55 -07:00
Adam Langley
f4aa2c2c93 crypto: remove POINT_CONVERSION_HYBRID from documentation.
Compressed points are already rare and, as far as I know, nobody has used
the 'hybrid' format anywhere, ever. It's prohibited in X.509
certificates too[1].

This change removes mentions of it from the documentation in the
interests of trying to pare-down the complexity of cryptography.

[1] https://tools.ietf.org/html/rfc5480#section-2.2

PR-URL: https://github.com/nodejs/node/pull/4956
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-26 21:45:26 -07:00
Sakthipriyan Vairamani
b3e7ac2605
util: improve function signature of util._extend
The function signature of `util._extend` is not intuitive and the
documentation doesn't specify the necessary second parameter. This
patch changes the parameter names in the code and the function params
in doc.

PR-URL: https://github.com/nodejs/node/pull/8187
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-08-26 18:53:39 +05:30
Luigi Pinca
379d9162a2 doc: add added: information for dgram
PR-URL: https://github.com/nodejs/node/pull/8196
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-25 10:56:28 -07:00
David Keeler
7f1bb8044a
doc: fix buf.readUIntBE, buf.readUIntLE examples
The documentation describing the output from the examples for
buf.readUIntBE and buf.readUIntLE were switched in terms of what the
code would actually output. This patch addresses this by switching the
two lines of example code to be in the same order as the functions are
listed earlier in the documentation.

PR-URL: https://github.com/nodejs/node/pull/8240
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
2016-08-25 07:24:41 +02:00
Fangshi He
e7866568e5
doc: fix "timout" typo in timeout
Corrected to `timeout`

PR-URL: https://github.com/nodejs/node/pull/8231
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-25 07:23:28 +02:00
Anna Henningsen
59714cb7b3
util: allow symbol-based custom inspection methods
Add a `util.inspect.custom` Symbol which can be used to customize
`util.inspect()` output. Providing `obj[util.inspect.custom]`
works like providing `obj.inspect`, except that the former allows
avoiding name clashes with other `inspect()` methods.

Fixes: https://github.com/nodejs/node/issues/8071
PR-URL: https://github.com/nodejs/node/pull/8174
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-08-25 07:13:00 +02:00
Sakthipriyan Vairamani
6e50fc7637 doc: include the optional options parameter
`mkdtemp` functions accept an optional `options` parameter, which can
be either a String specifying encoding, or an Object with an `encoding`
property.

PR-URL: https://github.com/nodejs/node/pull/7842
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
2016-08-24 16:15:11 -07:00
Luigi Pinca
16f4b8ebfc doc: add added: information for util
PR-URL: https://github.com/nodejs/node/pull/8206
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2016-08-23 11:31:53 -07:00
James M Snell
0764bc4711 Revert "crypto: add crypto.timingSafeEqual"
This reverts commit 0fc5e0dcd9.

Additional testing indicates that there may still be timing issues
with this implementation. Revert in order to give more time for
testing before this goes out into a release...

Refs: https://github.com/nodejs/node/pull/8040
Refs: https://github.com/nodejs/node/pull/8203
PR-URL: https://github.com/nodejs/node/pull/8225
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-23 10:52:32 -07:00
Simen Bekkhus
1df3797bf4
doc: correct argument type for process.cpuUsage
PR-URL: https://github.com/nodejs/node/pull/8158
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-22 11:38:25 +02:00
Shahid Shaikh
9a91ffbbde doc: add es6 code example in util.md
Added class/extends example to util.md

PR-URL: https://github.com/nodejs/node/pull/8183
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-08-21 14:53:11 -07:00
not-an-aardvark
0fc5e0dcd9 crypto: add crypto.timingSafeEqual
PR-URL: https://github.com/nodejs/node/pull/8040
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-08-19 19:36:05 -07:00
Bartosz Sosnowski
0abdf59f50 doc: script with spaces spawn example for windows
Adds an example of how to spawn a shell script under Windows with
spaces in its filename.

Ref: https://github.com/nodejs/node/issues/7367
PR-URL: https://github.com/nodejs/node/pull/8035
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-18 10:37:10 -07:00
lazlojuly
66d697cb5c doc: fix variable scoping bug in server example code
Const is block scoped.

PR-URL: https://github.com/nodejs/node/pull/8124
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-08-18 09:50:27 -07:00
cjihrig
d83373d800 2016-08-15, Version 6.4.0 (Current)
Notable changes:

* build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) https://github.com/nodejs/node/pull/7983 and https://github.com/nodejs/node/pull/7576
* child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) https://github.com/nodejs/node/pull/7811 and https://github.com/nodejs/node/pull/7838
* child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) https://github.com/nodejs/node/pull/7696
* fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) https://github.com/nodejs/node/pull/7942
* repl: The REPL now supports editor mode. (Prince J Wesley) https://github.com/nodejs/node/pull/7275
* util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) https://github.com/nodejs/node/pull/8013

Refs: https://github.com/nodejs/node/issues/8020
PR-URL: https://github.com/nodejs/node/pull/8070
2016-08-16 10:36:00 -04:00
Ben Gourley
24e4488891 doc: fix "hashOwnProperty" typo in querystring
querystring subsystem docs referred to `obj.hashOwnProperty()`
which is non-existent. Corrected to `obj.hasOwnProperty()`.

PR-URL: https://github.com/nodejs/node/pull/8107
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-08-15 10:42:38 -07:00
Bartosz Sosnowski
08996fde3c fs: restore JS implementation of realpath
This reverts parts of b488b19eaf
restoring javascript implementation of realpath and realpathSync.

Fixes: https://github.com/nodejs/node/issues/7175
Fixes: https://github.com/nodejs/node/issues/6861
Fixes: https://github.com/nodejs/node/issues/7294
Fixes: https://github.com/nodejs/node/issues/7192
Fixes: https://github.com/nodejs/node/issues/7044
Fixes: https://github.com/nodejs/node/issues/6624
Fixes: https://github.com/nodejs/node/issues/6978
PR-URL: https://github.com/nodejs/node/pull/7899
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-12 13:07:55 +02:00
Jeremiah Senkpiel
ab3306ad51
tty: set the handle to blocking mode
Refs: https://github.com/nodejs/node/pull/1771
Refs: https://github.com/nodejs/node/issues/6456
Refs: https://github.com/nodejs/node/pull/6773
Refs: https://github.com/nodejs/node/issues/7743
PR-URL: https://github.com/nodejs/node/pull/6816
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-10 23:41:28 +02:00
Zach Bjornson
e925b62771 doc: fix cluster message event docs
Fixes: https://github.com/nodejs/node/issues/7997
PR-URL: https://github.com/nodejs/node/pull/8017
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-10 09:11:22 -04:00
Anna Henningsen
c628982a06 doc: add added: information for cluster
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/7640
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-09 15:54:06 -07:00
Roman Reiss
1a6a69a8e0
util: add inspect.defaultOptions
Adds util.inspect.defaultOptions which allows customization of the
default util.inspect options, which is useful for functions like
console.log or util.format which implicitly call into util.inspect.

PR-URL: https://github.com/nodejs/node/pull/8013
Fixes: https://github.com/nodejs/node/issues/7566
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-08-09 20:57:24 +02:00
Luigi Pinca
bb3b4d7d49 doc: fix typo in vm.runInNewContext() description
PR-URL: https://github.com/nodejs/node/pull/8005
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-09 11:31:46 -07:00
Linus Unnebäck
4a87abb8e8 fs: add bytesRead to ReadStream
Add a property named bytesRead that exposes how many bytes that have
currently been read from the file. This brings consistency with
WriteStream that has bytesWritten and net.Socket which have both
bytesRead and bytesWritten.

Fixes: https://github.com/nodejs/node/issues/#7938
PR-URL: https://github.com/nodejs/node/pull/7942
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-08 10:11:17 -07:00
Pat Pannuto
99f45b2476
child_process: control argv0 for spawned processes
In some cases it useful to control the value of `argv[0]`, c.f.
 - https://github.com/andrewffff/child_process_with_argv0
 - https://github.com/andrep/argv0

This patch adds explicit support for setting the value of `argv[0]`
when spawning a process.

PR-URL: https://github.com/nodejs/node/pull/7696
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-08 16:35:43 +02:00
Pat Pannuto
a804db1af7
process: save original argv[0]
For historical and other reasons, node overwrites `argv[0]` on startup.
See
 - 2c6f79c08,
 - https://github.com/nodejs/node/issues/7434
 - https://github.com/nodejs/node/pull/7449
 - https://github.com/nodejs/node/pull/7696

For cases where it may be useful, save the original value of `argv[0]`
in `process.argv0`

PR-URL: https://github.com/nodejs/node/pull/7696
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-08 16:33:57 +02:00
kibertoad
beea23af65
doc: clarify fd closing by fs.readFile etc.
Ref: https://github.com/nodejs/node/issues/7560
PR-URL: https://github.com/nodejs/node/pull/7561
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-08 15:24:33 +02:00
Prince J Wesley
b779eb423d
repl: Add editor mode support
```js
> node
> .editor
// Entering editor mode (^D to finish, ^C to cancel)
function test() {
  console.log('tested!');
}

test();

// ^D
tested!
undefined
>
```

PR-URL: https://github.com/nodejs/node/pull/7275
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-08-06 19:41:35 +05:30