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

64 Commits

Author SHA1 Message Date
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
Timothy J Fontaine
fcca3585fe Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	lib/tls.js
	src/node.js
2013-12-06 21:27:18 -08:00
Yazhong Liu
bd7fa92de4 doc: list execArgv option for child_process.fork() 2013-12-02 13:41:30 -08:00
Timothy J Fontaine
85c19175ed Merge remote-tracking branch 'upstream/v0.10' 2013-11-26 08:41:09 -08:00
Linus Unnebäck
953d7184ec doc: clarify child_process error behaviour
Clarify that an 'error' event may or may not be followed by an 'exit'
event and that it's not safe to make assumptions either way.
2013-11-23 15:46:50 +01:00
Timothy J Fontaine
61ccaf9a97 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/include/uv-darwin.h
	deps/uv/src/unix/fsevents.c
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	doc/api/addons.markdown
	doc/api/cluster.markdown
	doc/api/http.markdown
	lib/http.js
	lib/tls.js
	src/node_crypto.cc
	src/node_http_parser.cc
	src/node_version.h
	src/pipe_wrap.cc
	src/v8abbr.h
	src/v8ustack.d
	test/simple/test-http-pipeline-flood.js
2013-10-25 11:26:05 -07:00
Sam Roberts
ed186c971c doc: child_process corrections and cleanups
- Make explicit that .disconnected is set before the disconnect event,
  and it is not allowed to send messages after calling .disconnect(),
  even while waiting for a delayed disconect event.
- Remove obsolete claim that explicit exit is required
- Describe silent: in the options for fork()
- Describe .connected as the property it is, not just as an aside in
  the disconnect() method
2013-10-16 15:10:13 -07:00
Ben Noordhuis
c13bfdc091 child_process: add 'shell' option to .exec()
No test, we can't rely on an alternate shell being available.

Fixes #5935.
2013-07-29 16:41:56 +02:00
Tim Oxley
2d6d46172e doc: remove obsolete spawn() stdio options 2013-07-05 11:56:24 +02:00
Ben Noordhuis
9826b15493 doc: sending dgram handles only works on unix 2013-05-29 16:35:01 +02:00
Kevin Locke
1c2b03dea5 doc: update options for exec and execFile
The stdio and customFds options are never used by exec or execFile,
remove them from the documentation for these functions.
2013-05-03 16:01:33 +02:00
Ben Noordhuis
a80a132b38 doc: child_process: document 'error' event
Fixes #5130.
2013-03-26 16:34:43 +01:00
Andreas Madsen
bdf7ac2c5d child_process: support sending dgram socket
child.send can send net servers and sockets. Now that we have support
for dgram clusters this functionality should be extended to include
dgram sockets.
2013-03-07 17:51:17 +01:00
Ben Noordhuis
cb87920ba9 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/src/unix/pipe.c
	lib/http.js
	src/node_version.h
2013-02-28 16:58:24 +01:00
Ben Noordhuis
22d3eff8f4 doc: add note about child process line buffering
Fixes #4808.
2013-02-22 01:19:40 +01:00
isaacs
75df612cd7 doc: Use 'close' rather than 'exit' in spawn examples
Close #4515
2013-02-18 11:24:14 -08:00
isaacs
d75e39794b Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	lib/http.js
	src/node_version.h
	test/simple/test-http-header-response-splitting.js
2013-02-18 10:21:08 -08:00
Ben Noordhuis
3e2be6f39f doc: clarify child_process.exec() stdio option
It only works for stdin, not stdout/stderr, for obvious reasons.
2013-02-14 19:42:14 +01:00
isaacs
ee2fd79e43 doc: Remove mention of child.send 'track' option
Will be removed very soon.  No point making it public.
2013-01-18 11:04:10 -08:00
Fedor Indutny
4488a69fac child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want to receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-18 03:13:41 +04:00
Fedor Indutny
44cd121c63 Revert "child_process: do not keep list of sent sockets"
This reverts commit db5ee0b3de.
2013-01-18 03:13:10 +04:00
Fedor Indutny
db5ee0b3de child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want `server.connections` to be a reliable
  number, and receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-17 13:46:31 -08:00
Bradley Meck
70ad9bbcbd child_process: make fork() execPath configurable
Allows for arbitrary path to executable spawned using `fork`. This
fixes some issues around running multiple versions of node with workers
and allows arbitrary IPC with compatible executables.

Fixes #3248.
2013-01-06 22:55:30 +01:00
Olivier Lalonde
626db18635 doc: child_process: document uid and gid spawn() options 2012-10-24 01:24:00 +02:00
Robin Lee
a08271c7a8 doc: fix three typos 2012-09-17 16:05:53 +02:00
Kyle Robinson Young
4ef808ec0a doc: remove unused util from child_process 2012-08-12 00:08:43 +02:00
Kyle Robinson Young
bc7479d232 doc: fix typos in child_process 2012-08-06 00:13:56 +02:00
Bert Belder
9e2319f977 docs: remove unused require from example
Closes GH-3801
2012-07-31 21:38:58 +02:00
Ben Noordhuis
2eb6a62f4f doc: document child_process.fork() limitation 2012-07-31 03:09:49 +02:00
isaacs
f8dab6acb6 doc: Remove timeout arg in child_process.fork
Fix #3784
2012-07-30 11:01:57 -07:00
Mike Morearty
19aa05fab8 doc: fix bug in child_process.spawn() sample code 2012-07-16 02:27:01 +02:00
Andreas Madsen
401ff10295 doc: detached is a boolean 2012-06-26 17:30:07 +02:00
Ben Kelly
c6185c8484 doc: Improve cross-linking in API docs markdown
Cross-link EventEmitter references in API docs to events.html

Fix broken cross-reference links with wrong anchor names in API docs.
2012-06-15 09:44:37 -07:00
Charlie McConnell
4b021a3541 child_process: expose UV_PROCESS_DETACHED as options.detached 2012-06-08 22:57:22 -07:00