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

97 Commits

Author SHA1 Message Date
James M Snell
9b21119e17 doc: fix, modernize examples in docs
* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency

PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-12-17 08:07:29 -08:00
Rich Trott
37ed05b8c1 doc: copyedit child_process doc
PR-URL: https://github.com/nodejs/node/pull/4188
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2015-12-09 16:56:26 -08:00
yorkie
cc2ceb6cb9 doc: improve child_process.markdown wording
PR-URL: https://github.com/nodejs/node/pull/4138
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-04 10:26:29 -08:00
jpersson
14b3aab7d2 doc: add links and backticks around names
* add backticks around names
* add single quotes around event names
* add parenthesis after function names
* add internal links between different sections
* add external links to MDN for some JavaScript references
* sort the link definitions alphabetically

PR-URL: https://github.com/nodejs/node/pull/4054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-12-03 13:39:09 -08:00
Luigi Pinca
15dc37ff4f doc: fix internal link to child.send()
PR-URL: https://github.com/nodejs/node/pull/4089
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-01 10:05:07 -05:00
Bryan English
cd1123a0fb doc: consistent reference-style links
Moved all the URLs in API docs to the bottom of the files as
reference-style links.

PR-URL: https://github.com/nodejs/node/pull/3845
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-16 07:36:59 -08:00
Tristian Flanagan
f7169d2336 doc: sort child_process alphabetically
Reorders, with no contextual changes, the child_process documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-11-12 17:39:17 -08:00
Rich Trott
cdcf00a0b9 lib,doc: return boolean from child.send()
The documentation indicates that child.send() returns a boolean but it
has returned undefinined at since v0.12.0. It now returns a boolean per
the (slightly updated) documentation.

PR-URL: https://github.com/nodejs/node/pull/3516
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-28 16:21:36 -07:00
Kyle Smith
60a3dd4810 doc: clarify the use of option.detached
This paragraph conveys that detached child processes do not stay
running in the background in general. Instead clarify that this
refers to the parent process exiting before the detached child
process is complete.

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3250
2015-10-21 12:34:59 -07:00
fansworld-claudio
49f965c41c docs: add missing shell option to execSync
Adds the "shell" option from child_process.exec to
child_process.execSync on the api docs.

Fixes: #3387
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3440
2015-10-20 12:09:35 -07:00
Alejandro Oviedo
2146f62065 doc: add method links in child_process.markdown
Added links to referenced methods.

PR-URL: https://github.com/nodejs/node/pull/3186
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 18:41:09 +02:00
Laurent Fortin
2d21092400 doc: rearrange execSync and execFileSync
Changed the ordering so it is in line with the async methods.

PR-URL: https://github.com/nodejs/node/pull/2940
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-09-23 22:20:18 +02:00
Laurent Fortin
28da400d47 doc: make execFileSync in line with execFile
PR-URL: https://github.com/nodejs/node/pull/2940
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-09-23 22:19:12 +02:00
Sam Roberts
a12628bd97 doc: describe spawn option.detached
PR-URL: https://github.com/nodejs/node/pull/2903
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-09-16 10:51:37 -07:00
Sam Roberts
f442904a27 doc: describe process API for IPC
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/1978
2015-09-09 09:46:20 -07:00
Ben Noordhuis
607aa3ac82 child_process: add callback parameter to .send()
Add an optional callback parameter to `ChildProcess.prototype.send()`
that is invoked when the message has been sent.

Juggle the control channel's reference count so that in-flight messages
keep the event loop (and therefore the process) alive until they have
been sent.

`ChildProcess.prototype.send()` and `process.send()` used to operate
synchronously but became asynchronous in commit libuv/libuv@393c1c5
("unix: set non-block mode in uv_{pipe,tcp,udp}_open"), which landed
in io.js in commit 07bd05b ("deps: update libuv to 1.2.1").

Fixes: https://github.com/nodejs/node/issues/760
PR-URL: https://github.com/nodejs/node/pull/2620
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2015-09-06 21:37:58 +10:00
James M Snell
ac0563f97d doc: remove 'dudes' from documentation
per: https://github.com/joyent/node/pull/25572#discussion_r33197896

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:32 -07:00
James M Snell
a5b7852292 doc: update tense in child_process.markdown
per: https://github.com/joyent/node/pull/25826

originally submitted by: @ClimbsRocks

Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2378
2015-08-25 18:52:28 -07:00
cjihrig
a69ab27ab4 node: rename from io.js to node
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.

Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-23 17:59:43 -04:00
James M Snell
936c9ffb0f doc: multiple documentation updates cherry picked from v0.12
* doc: improve http.abort description
 * doc: mention that mode is ignored if file exists
 * docs: Fix default options for fs.createWriteStream()
 * Documentation update about Buffer initialization
 * doc: add a note about readable in flowing mode
 * doc: Document http.request protocol option
 * doc, comments: Grammar and spelling fixes
 * updated documentation for fs.createReadStream
 * Update child_process.markdown, spelling
 * doc: Clarified read method with specified size argument.
 * docs:events clarify emitter.listener() behavior
 * doc: two minor stream doc improvements
 * doc: clarify Readable._read and Readable.push
 * doc: stream.unshift does not reset reading state
 * doc: readable event clarification
 * doc: additional refinement to readable event

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noorduis <ben@strongloop.com>
PR-URL: https://github.com/nodejs/io.js/pull/2302
2015-08-05 08:44:55 -07:00
Rich Trott
ff39ecb914 doc: remove comma splice
Remove comma splice. Edit for clarity and concision.

PR-URL: https://github.com/nodejs/io.js/pull/1900
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-06-07 22:25:24 +02:00
Rich Trott
86dd244d9b doc: add notes to child_process.fork() and .exec()
Adds notes about the difference to their POSIX counterparts.

PR-URL: https://github.com/nodejs/io.js/pull/1718
Fixes: https://github.com/nodejs/io.js/issues/224
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-20 14:21:06 +02:00
Nick Raienko
2a3a1909ab doc: add require() lines to child.stdio example
PR-URL: https://github.com/iojs/io.js/pull/1504
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-05-02 15:55:36 -07:00
Nick Raienko
b16a328ede doc: add spaces to child.kill example
PR-URL: https://github.com/iojs/io.js/pull/1503
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-04-22 21:54:43 -07:00
Sam Roberts
9741291fe9 doc: fix child_process heading depth
Addition of the Sync/Async headers didn't indent all the sub-headers.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/iojs/io.js/pull/1038
2015-03-03 11:21:33 -08:00
Chris Dickinson
cf0306cd71 doc: update stability index
This simplifies the stability index to 4 levels:

0 - deprecated
1 - experimental / feature-flagged
2 - stable
3 - locked

Domains has been downgraded to deprecated, assert has been
downgraded to stable. Timers and Module remain locked. All
other APIs are now stable.

PR-URL: https://github.com/iojs/io.js/pull/943
Fixes: https://github.com/iojs/io.js/issues/930
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>
2015-02-27 14:23:01 -08:00
Omer Wazir
cb5560bd62 doc: Close code span correctly
The code span is closed with a straight quote instead of the correct
back tick being used.

PR-URL: https://github.com/iojs/io.js/pull/814
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-11 22:20:12 -08:00
Ben Noordhuis
789bbb91d3 doc: update node.js references in api docs
Fixes: https://github.com/iojs/io.js/issues/740
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-02-07 17:07:15 -05:00
Sam Roberts
c7b333b866 doc: cover stdio option in child_process
- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>

Cherry-picked-from: https://github.com/joyent/node/commit/3a08b7c3e0bc6757e70889196
2015-01-10 22:24:13 +01:00
Tim Ruffles
6f49c244d1 doc: be specific about the unit of maxBuffer
The maxBuffer option was not self-documenting, so document the unit and
its effect.

PR-URL: https://github.com/iojs/io.js/pull/209
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-29 17:26:41 +01:00
Trevor Norris
f2a78de6ec doc: fix optional parameter parsing
The parameter parser specifically looked for the old bracket syntax.
This generated a lot of warnings when building the docs. Those warnings
have been fixed by changing the parsing logic.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-09-29 16:32:34 -07:00
Trevor Norris
51b6b6844e doc: fix brackets for optional parameters
Documentation incorrectly used bracket notation for optional parameters.
This caused inconsistencies in usage because of examples like the
following:

    fs.write(fd, data[, position[, encoding]], callback)

This simply fixes all uses of bracket notation in documentation.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-25 11:26:15 -07:00
Ryan Graham
9452ea2ef5 doc: re-org child_process into async/sync
Cleaner separation between the traditional non-blocking functions and
the new blocking variants.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:20:33 +03:00
Ryan Graham
feac62d8d6 doc: remove customFds mentions
The feature has been marked as deprecated since v0.5.11.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-10 15:07:07 +03:00
Fedor Indutny
ae1e325e8a child_process: accept uid/gid everywhere
Accept uid/gid option in every execute/spawn call (including
cluster.fork). Add documentation where needed.

fix #7881

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02 13:01:07 -07:00
Kyle Robinson Young
16ed194659 doc: typos in child_process
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 20:25:26 +04:00
Fedor Indutny
9920ae67b5 Merge branch 'v0.10'
Conflicts:
	ChangeLog
	lib/events.js
	lib/tls.js
	src/node_constants.cc
	src/node_crypto.cc
	src/node_crypto.h
	src/node_version.h
2014-06-05 07:28:39 -07:00
Chris Barber
715bb7f89f doc: fixed wording in child_process
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-31 10:09:02 +01:00
Adrian Lang
044da47353 doc: correct check for failed child_process.spawn
Since 0.10.x, exec failures are no longer signaled through stderr,
but rather as error events.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-02 22:57:16 +04:00
Timothy J Fontaine
937e2e351b child_process: execFileSync stderr should inherit
If you don't set your options.stdio for execSync and execFileSync
capture and write to stderr of the parent process by default.

Fixes #7110
2014-02-18 16:03:13 +04:00
Timothy J Fontaine
e8df267674 child_process: js bits for spawnSync/execSync
This implements the user-facing APIs that lets one run a child process
and block until it exits.

Logic shared with the async counterpart of each function was refactored
to enable code reuse.

Docs and tests are included.
2014-02-10 13:35:37 -08:00
Timothy J Fontaine
eadb4f5606 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	deps/v8/src/preparser.cc
	deps/v8/src/win32-math.h
	doc/api/http.markdown
	src/node_buffer.h
	src/node_crypto.cc
	src/node_file.cc
	src/node_http_parser.cc
2014-02-08 16:45:27 -08:00
Benjamin Waters
d2147c55c2 doc: fix references to error keyword
References for err.signal and err.code should be error.signal and
error.code.

Fixes joyent/node#6862
2014-02-04 12:50:24 +04:00
Timothy J Fontaine
c1b1f31203 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	lib/net.js
	node.gyp
	src/node_version.h
2014-01-24 19:13:50 -08:00
Sam Roberts
198ed0bd0d doc: describe child_process.fork() silent option 2014-01-16 07:35:12 -08:00
Sam Roberts
549be1caa8 doc: child_process.execFile arguments are optional 2014-01-16 07:35:12 -08:00
Timothy J Fontaine
fc52ed85f6 Merge remote-tracking branch 'upstream/v0.10' 2014-01-13 14:56:41 -08:00
Sam Roberts
7bd6e33318 doc: streams must be open to be passed to child
spawn stdio options can be a 'stream', but the following code
fails with "Incorrect value for stdio stream: [object Object]",
despite being a stream. The problem is the test isn't really
for a stream, its for an object with a numeric `.fd` property,
and streams do not have an fd until their async 'open' event
has occurred. This is reasonable, but was not documented.

    child_process.spawn('date', [], {stdio: [
      'ignore',
      fs.createWriteStream('out.txt',{flags:'a'}),
      'ignore']})
2014-01-13 21:36:56 +00:00
Timothy J Fontaine
08c83bb172 Merge remote-tracking branch 'upstream/v0.10' 2013-12-31 14:57:46 -08:00
Maciej Małecki
5a8de857f0 doc: document that process.send is synchronous
Ref #2598
2013-12-31 14:52:43 -08:00