summaryrefslogtreecommitdiff
path: root/lib/child_process.js
AgeCommit message (Collapse)Author
2019-11-30lib: use static Number properties from primordialsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/30686 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-27lib: enforce use of Array from primordialsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-11-26child_process: replace var with let/constdnlup
PR-URL: https://github.com/nodejs/node/pull/30389 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-11-25lib: flatten access to primordialsMichaël Zasso
Store all primordials as properties of the primordials object. Static functions are prefixed by the constructor's name and prototype methods are prefixed by the constructor's name followed by "Prototype". For example: primordials.Object.keys becomes primordials.ObjectKeys. PR-URL: https://github.com/nodejs/node/pull/30610 Refs: https://github.com/nodejs/node/issues/29766 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-11-05child_process,cluster: allow using V8 serialization APIAnna Henningsen
Add an `serialization` option that allows child process IPC to use the (typically more powerful) V8 serialization API. Fixes: https://github.com/nodejs/node/issues/10965 PR-URL: https://github.com/nodejs/node/pull/30162 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-07-14stream: use readableEncoding public api for child_processZYSzys
PR-URL: https://github.com/nodejs/node/pull/28548 Refs: https://github.com/nodejs/node/issues/445 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-22child_process: attach child in promisificationcjihrig
This commit updates the custom exec() and execFile() promisification to attach the ChildProcess instance to the returned Promise. PR-URL: https://github.com/nodejs/node/pull/28325 Fixes: https://github.com/nodejs/node/issues/28244 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2019-06-02child_process: move exports to bottom for consistent code stylehimself65
PR-URL: https://github.com/nodejs/node/pull/27845 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-05-27child_process: simplify spawn argument parsingcjihrig
This commit simplifies the object returned by normalizeSpawnArguments(). This does impact monkey patching, as illustrated by the changes in tests. PR-URL: https://github.com/nodejs/node/pull/27854 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-24child_process: remove extra shallow copyzero1five
PR-URL: https://github.com/nodejs/node/pull/27801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-05-16child_process: refactor stdioStringToArray functionzero1five
reduce the function in both files to one. PR-URL: https://github.com/nodejs/node/pull/27657 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-17child_process: change the defaults maxBuffer sizekohta ito
PR-URL: https://github.com/nodejs/node/pull/27179 Refs: https://github.com/nodejs/node/pull/23027 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-04-16lib: require globals instead of using the global proxyJoyee Cheung
In addition, use process.stderr instead of console.error when there is no need to swallow the error. PR-URL: https://github.com/nodejs/node/pull/27112 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-12lib: enforce the use of Object from primordialsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/27146 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2019-04-12child_process: harden fork arguments validationZYSzys
Ensure that the first argument `modulePath` of `fork` method must be provided and be of type string. PR-URL: https://github.com/nodejs/node/pull/27039 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-09child_process: use non-infinite maxBuffer defaultskohta ito
Set the default maxBuffer size to 204,800 bytes for execSync, execFileSync, and spawnSync. APIs that return the child output as a string should have non-infinite defaults for maxBuffer sizes to avoid out-of-memory error conditions. A non-infinite default used to be the documented behaviour for all relevant APIs, but the implemented behaviour for execSync, execFileSync and spawnSync was to have no maxBuffer limits. PR-URL: https://github.com/nodejs/node/pull/23027 Refs: https://github.com/nodejs/node/pull/22894 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-30benchmark,lib: change var to constRuben Bridgewater
Refs: https://github.com/nodejs/node/pull/26679 PR-URL: https://github.com/nodejs/node/pull/26915 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-27child_process: rename _validateStdtio to getValidStdioRuben Bridgewater
The name indicated only validation while it did much more and it returned a different value to the callee function. The underscore was also not necessary as the function is internal one way or the other. PR-URL: https://github.com/nodejs/node/pull/26809 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22child_process: reduce internal usage of public require of utiltoshi1127
PR-URL: https://github.com/nodejs/node/pull/26769 Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-21lib: use Array#includes instead of Array#indexOfWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/26732 Refs: https://github.com/nodejs/node/issues/26568 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-23child_process: truncate output when maxBuffer is exceededJeremiah Senkpiel
Preserves truncated output for `child_process.exec()` when `maxBuffer` is exceeded. This is particularly useful for commands which have indistinguishable error codes for what output they produce. PR-URL: https://github.com/nodejs/node/pull/24951 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-04lib: move DEP0006 to end of lifecjihrig
This commit moves DEP0006, which has been runtime deprecated since Node 0.11, to end of life status. PR-URL: https://github.com/nodejs/node/pull/25279 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-12-28child_process: simplify argument handlingcjihrig
This commit simplifies the calling of normalizeSpawnArguments() and normalizeExecArguments(). Specifically, this commit replaces apply() and the use of arguments with a normal function call. PR-URL: https://github.com/nodejs/node/pull/25194 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-20lib: remove internal `util._extends()` usageRuben Bridgewater
This removes all internal calls to the deprecated `_extends()` function. It is slower than `Object.assign()` and the object spread notation since V8 6.8 and using the spread notation often also results in shorter code. PR-URL: https://github.com/nodejs/node/pull/25105 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-20lib: switch to object spread where possibleRuben Bridgewater
Use the object spread notation instead of using Object.assign. It is not only easier to read it is also faster as of V8 6.8. PR-URL: https://github.com/nodejs/node/pull/25104 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-12-16child_process: spawn ignores options in case args is undefinedEduard Bondarenko
spawn method ignores 3-d argument 'options' in case the second one 'args' equals to 'undefined'. Fixes: https://github.com/nodejs/node/issues/24912 PR-URL: https://github.com/nodejs/node/pull/24913 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-13Revert "child_process: change windowsHide default to true"Rich Trott
This reverts commit 420d8afe3db22ad703e74892f58f9e32d34ff699. PR-URL: https://github.com/nodejs/node/pull/24034 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-11-01child_process: handle undefined/null for fork() argsShobhit Chittora
PR-URL: https://github.com/nodejs/node/pull/22416 Fixes: https://github.com/nodejs/node/issues/20749 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2018-10-04bootstrapper: move internalBinding to NativeModuleGus Caplan
internalBinding is used so often that it should just automatically be available for usage in internals. PR-URL: https://github.com/nodejs/node/pull/23025 Refs: https://github.com/nodejs/node/commit/2a9eb31 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-05child_process: fix switches for alternative shells on WindowsTessei Kameyama
On Windows, normalizeSpawnArguments set "/d /s /c" for any shells. It cause exec and other methods are limited to cmd.exe as a shell. Powershell and git-bash are often used instead of cmd.exe, and they can recieve "-c" switch like unix shells. So normalizeSpawnArguments is changed to set "/d /s /c" for cmd.exe, and "-c" for others. Fixes: https://github.com/nodejs/node/issues/21905 PR-URL: https://github.com/nodejs/node/pull/21943 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-05coverage: expose native V8 coverageBenjamin Coe
native V8 coverage reports can now be written to disk by setting the variable NODE_V8_COVERAGE=dir PR-URL: https://github.com/nodejs/node/pull/22527 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2018-08-31child_process: fix handling of incorrect uid/gid in spawnDenys Otrishko
uid/gid must be uint32, which is asserted on a c++ side but wasn't checked on a JS side and therefore resulted in a process crash. Refs: https://github.com/nodejs/node/issues/22570 PR-URL: https://github.com/nodejs/node/pull/22574 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-29lib: make pipe_wrap binding internalcjihrig
PR-URL: https://github.com/nodejs/node/pull/22482 Refs: https://github.com/nodejs/node/issues/22160 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-27child_process: allow typed arrays for inputSarat Addepalli
doc: Update child_process docs, stating typed arrays are allowed. error: Update error message for `ERR_INVALID_SYNC_FORK_INPUT` lib: Use isArrayBufferView instead of isUint8Array test: Update test-child-process-spawnsync-input to test for all typed arrays and data view. PR-URL: https://github.com/nodejs/node/pull/22409 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-15lib: remove unused exec paramMaleDong
`exec`'s parameters are now deconstructored through `normalizeExecArgs.apply`. We don't need an exclipit parameter anymore (and in fact it's NEVER referred in the code directly), like `spwan` or `spwanSync`. This might be missing. PR-URL: https://github.com/nodejs/node/pull/22274 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-07lib: extract validateString validatorJon Moss
Pulls out a common argument validator to `internal/validators` PR-URL: https://github.com/nodejs/node/pull/22101 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-16lib,src: replace all C++ promises with JS promisesRuben Bridgewater
C++ promises can not be properly optimized by V8. They also behave a tiny bit different than "regular" promises. PR-URL: https://github.com/nodejs/node/pull/20830 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-20child_process: change windowsHide default to truecjihrig
This is likely the default that more Windows users are expecting. PR-URL: https://github.com/nodejs/node/pull/21316 Refs: https://github.com/libuv/libuv/pull/1878 Refs: https://github.com/nodejs/node/pull/21314 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18child_process: fix exec set stdout.setEncodingkillagu
cp.exec decide to use `_stdout`(_stdout is string) or `Buffer.concat(_stdout)`(_stdout is buffer array) by options.encoding. but std(out|err) encoding can be changed. If encoding is changed to not null, `_stdout` will become string, and `Buffer.concat(_stdout)` will throw TypeError. This patch will fix it, use options.encoding and `std(out|err)._readableState.encoding`. PR-URL: https://github.com/nodejs/node/pull/18976 Fixes: https://github.com/nodejs/node/issues/18969 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-02child_process: name anonymous functionsDenis Fäcke
Refs: https://github.com/nodejs/node/issues/8913 PR-URL: https://github.com/nodejs/node/pull/20399 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-01tools: add 'spaced-comment' into eslint rulesWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/19596 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-03-29child_process: better spawn error messageBartosz Sosnowski
Throw ERR_INVALID_ARG_VALUE when filename passed to spawn is empty. Fixes: https://github.com/nodejs/node/issues/19235 PR-URL: https://github.com/nodejs/node/pull/19305 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-21tools,lib: forbid native Error constructorsMichaël Zasso
This adds a rule that forbids the use of native Error constructors in the `lib` directory. This is to encourage use of the `internal/errors` mechanism. The rule is disabled for errors that are not created with the `internal/errors` module but are still assigned an error code. PR-URL: https://github.com/nodejs/node/pull/19373 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-05lib: port errors to new systemMichaël Zasso
This is a first batch of updates that touches non-underscored modules in lib. PR-URL: https://github.com/nodejs/node/pull/19034 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-20util: implement util.getSystemErrorName()Joyee Cheung
Reimplement uv.errname() as internal/util.getSystemErrorName() to avoid the memory leaks caused by unknown error codes and avoid calling into C++ for the error names. Also expose it as a public API for external use. PR-URL: https://github.com/nodejs/node/pull/18186 Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-18child_process: do not ignore proto values of envAnatoli Papirovski
This reverts this behaviour introduced in a recent PR, and updates the test. Without this change, CitGM and other packages are broken. PR-URL: https://github.com/nodejs/node/pull/18210 Fixes: https://github.com/nodejs/citgm/issues/536 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-15child_process: ignore undef/proto values of env现充
At present, undefined values of env option will be transferred as a "undefined" string value, and values in prototype will also be included, which are not usual behaviors. This commit prevents those to be transferred to the environment of the child process. PR-URL: https://github.com/nodejs/node/pull/15089 Fixes: https://github.com/nodejs/node/issues/15087 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-12-24lib: combine similar error codesWeijia Wang
There two similar error codes in lib: "ERR_VALUE_OUT_OF_RANGE" and "ERR_OUT_OF_RANGE". This change is to reduce them into "ERR_VALUE_OUT_OF_RANGE" Fixes: https://github.com/nodejs/node/issues/17603 PR-URL: https://github.com/nodejs/node/pull/17648 Fixes: https://github.com/nodejs/node/issues/17603 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-11-29errors, child_process: use internal/errors codesJon Moss
PR-URL: https://github.com/nodejs/node/pull/14998 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-11-28async_wrap: add provider types for net serverAndreas Madsen
Adds `TCPSERVERWRAP` and `PIPESERVERWRAP` as provider types. This makes it possible to distinguish servers from connections. PR-URL: https://github.com/nodejs/node/pull/17157 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>