0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

96 Commits

Author SHA1 Message Date
Fedor Indutny
0a89e8b838 child_process: add .stdin stream to forks
Remove test as it doesn't make any sense after the latest stdio API
changes.
2012-06-19 01:46:28 +04:00
isaacs
1f93aa5d5d 2012.06.15, Version 0.7.11 (unstable)
* V8: Upgrade to v3.11.10

* npm: Upgrade to 1.1.26

* doc: Improve cross-linking in API docs markdown (Ben Kelly)

* Fix #3425: removeAllListeners should delete array (Reid Burke)

* cluster: don't silently drop messages when the write queue gets big (Bert Belder)

* Add Buffer.concat method (isaacs)

* windows: make symlinks tolerant to forward slashes (Bert Belder)

* build: Add node.d and node.1 to installer (isaacs)

* cluster: rename worker.unqiueID to worker.id (Andreas Madsen)

* Windows: Enable ETW events on Windows for existing DTrace probes. (Igor Zinkovsky)

* test: bundle node-weak in test/gc so that it doesn't need to be downloaded (Nathan Rajlich)

* Make many tests pass on Windows (Bert Belder)

* Fix #3388 Support listening on file descriptors (isaacs)

* Fix #3407 Add os.tmpDir() (isaacs)

* Unbreak the snapshotted build on Windows (Bert Belder)

* Clean up child_process.kill throws (Bert Belder)

* crypto: make cipher/decipher accept buffer args (Ben Noordhuis)
2012-06-15 12:10:43 -07:00
Andreas Madsen
1e0ce5d1bd domain: the EventEmitter constructor is now always called in nodecore 2012-06-15 09:49:05 -07:00
Bert Belder
10f85fadfe Fix child_process.kill oddities
* When the process is already dead, but the `exit` signal wasn't raised
  yet, the ESRCH error should be ignored.

* When an invalid signal is specified, kill() should throw.

* Like process.kill(), child_process.kill() now preserves a `0` signal
  which can be used to check the liveliness of the child process.

* process.kill() and child_process.kill() will now return true if the
  signal was actually delivered, and false otherwise.

* When an `exec`-ed process is automatically killed because a time or
  buffer limit is exceeded, and the kill() fails, this error should be
  reported through the `exec` callback.

Fixes: #3409
2012-06-12 23:30:56 +02:00
Bert Belder
cfa28690db cluster: don't silently drop messages when the write queue gets big 2012-06-11 23:46:17 +02:00
isaacs
1358632e67 Remove auto-unref
cc: @AvianFlu @AndreasMadsen
2012-06-11 09:07:42 -07:00
Charlie McConnell
4b021a3541 child_process: expose UV_PROCESS_DETACHED as options.detached 2012-06-08 22:57:22 -07:00
Fedor Indutny
3116522e7c child_process: spawn().ref() and spawn().unref() 2012-06-07 23:20:56 +04:00
Fedor Indutny
af98fc9d5f child_process: new stdio API for .spawn() method 2012-06-01 20:52:13 +04:00
Ben Noordhuis
a3908f47f1 child_process: hook up handle wrap to owning object 2012-05-15 16:59:01 +02:00
Ben Noordhuis
4ec77e2e28 child_process: rename field _internal to _handle
Consistent with how other classes that are built around HandleWraps call it.
2012-05-15 16:59:01 +02:00
Andreas Madsen
dceebbfa31 child_process: allow sending a net Socket and Server object using child.send
child_process.fork() support sending native hander object, this patch add support for sending
net.Server and net.Socket object by converting the object to a native handle object and back
to a useful object again.

Note when sending a Socket there was emitted by a net Server object, the server.connections
property becomes null, because it is no longer possible to known when it is destroyed.
2012-05-14 07:47:52 -07:00
Ben Noordhuis
68f63fe9ec child_process: make copy of options arg
Make a copy of the options object that the user passes in, we modify it.
2012-05-10 16:54:19 +02:00
Bert Belder
0e57aafbb1 Optimize writing strings with Socket.write 2012-05-09 03:56:19 +02:00
Bert Belder
c8a10e97c8 Merge branch 'v0.6'
Conflicts:
	deps/uv/include/uv-private/uv-unix.h
	deps/uv/include/uv-private/uv-win.h
	deps/uv/src/uv-common.c
	deps/uv/src/win/fs.c
	src/process_wrap.cc
2012-04-29 00:17:23 +02:00
Bert Belder
55e4d54927 Child process: support the gid and uid options 2012-04-27 22:13:00 +02:00
Andreas Madsen
5b43c63c88 child_process: emit error when .kill fails 2012-04-12 08:17:42 -07:00
isaacs
b9bfb1bc91 child_process: Emit err rather than throw for IPC write failure 2012-04-06 14:16:09 -07:00
Andreas Madsen
ab32e9e043 child_process: emit 'channel closed' error instead of throwing 2012-03-19 11:55:41 -07:00
Charlie McConnell
c7b8073afc child_process: Separate 'close' event from 'exit'
Currently, a child process does not emit the 'exit' event until 'close' events
have been received on all three of the child's stdio streams.  This change makes
the child object emit 'exit' when the child exits, and a new 'close' event when
all stdio streams are closed.
2012-03-15 17:07:11 -07:00
Micheil Smith
19fd5301bf Expose original argv as process.execArgv for cluster and child_process.fork() 2012-03-15 13:47:43 -07:00
Shea Levy
024451c65c fork: don't clear environment by default
- Set options.env to process.env instead of {} by default.
- Shallow clone the passed options.env in case the user passed process.env directly.
2012-03-07 17:25:59 +01:00
Joshua Holbrook
56cfcea4b4 child_process: remove dummy "setsid" option setting 2012-02-29 02:10:56 +01:00
Joshua Holbrook
4065b241e8 child_process: remove dummy "setsid" option setting 2012-02-29 02:06:20 +01:00
Maciej Małecki
c6c6f98f1c util: add util._extend for extending objects
There were 2 duplicates with such functionality in `cluster` and
`child_process` modules which were replaced by this function.
2012-02-20 21:58:00 +01:00
isaacs
0cdf85e28d Lint all the JavaScripts. 2012-02-18 15:34:57 -08:00
Andreas Madsen
9da830e895 child_process: stop .disconnect() call if channel is diconnected 2012-02-08 11:42:38 -08:00
Ben Noordhuis
74a8215a86 Revert support for isolates.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.

Hence, this commit backs out all isolates-related changes.

Good bye, isolates. We hardly knew ye.
2012-02-06 15:44:42 +01:00
Igor Zinkovsky
db3c4efd1d support for sharing streams accross isolates 2012-01-31 17:45:50 -08:00
Andreas Madsen
33b7fc250f child_process: do not disconnect on exit emit
When using isolate the .fork would break because it had
no .disconnect method. This remove the exit handler there
would call .disconnect since it was not required.
It also change .disconnect to throw if the channel is closed,
this was not possible before because .disconnect would be called
twice.
2012-01-31 17:22:21 -08:00
Andreas Madsen
836344c90e Add disconnect method to forked child processes
This disconnect method allows the child to exit gracefully.
This also adds a disconnect event and connect property.
2012-01-30 16:35:27 +01:00
Fedor Indutny
667aae596c Merge branch 'v0.6'
Conflicts:
	ChangeLog
	doc/template.html
	lib/cluster.js
	lib/http.js
	lib/tls.js
	src/node.h
	src/node_version.h
	test/simple/test-cluster-kill-workers.js
2012-01-24 00:30:28 +06:00
Andreas Madsen
70884875c9 Allow calling fork() without args or options
Closes GH-2424
2012-01-17 19:07:57 +01:00
Andreas Madsen
ca6ededbd1 child_process: add errno property to exceptions
In case of a write failure when using fork() an error would be thrown. The
thrown exception was missing the `errno` property.
2012-01-17 18:37:02 +01:00
Maciej Małecki
4d49469d0d child_process: fix typo in internal message event name 2012-01-10 23:16:07 +01:00
Fedor Indutny
6b2091b58a debug threads 2012-01-10 02:28:49 +01:00
Ben Noordhuis
42281124d4 child_process: add isolates support
Passing an options object with {thread:true} to .fork() or .spawn() will run the
target script in a thread instead of a separate process.
2012-01-06 00:47:14 +01:00
Andreas Madsen
5f08c3cfa1 cluster improvements: Worker class and isolate internal messages
Fixes #2388
2012-01-04 18:30:19 -08:00
Ryan Dahl
4428b70cba Add isolate version of test-child-process-fork 2011-12-29 01:56:11 +01:00
Ryan Dahl
f7f8af8420 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	lib/_debugger.js
2011-12-21 12:17:23 -08:00
Ben Noordhuis
6df7bdd954 child_process: make .send() throw if message is undefined
JSON.stringify(undefined) returns "undefined" but JSON.parse() doesn't know how
to parse that.
2011-12-18 01:29:07 +01:00
Andreas Madsen
b084322f52 Add silent option to child_process.fork
Fixes #2354.
2011-12-17 12:53:44 -08:00
Andreas Madsen
a599aeb2a8 jslint
Fixes #2306
2011-12-16 12:57:03 -08:00
Ryan Dahl
60e26668b3 Remove superfluous 'new' 2011-12-04 00:09:10 -08:00
Thomas Shinnick
eba1f7b1a4 child_process: fix order of args to errnoException() 2011-11-28 20:45:01 +01:00
Bert Belder
189dd8f803 Fix line endings and trailing whitespace 2011-11-04 16:24:34 +01:00
Maciej Małecki
6bd0bcd5af child_process: in a new ChildProcess set killed to false
This behavior is consistent with what v0.4 does.
2011-11-02 18:17:51 +01:00
Igor Zinkovsky
3060266ff1 windows: enable pending accepts knob 2011-11-01 14:14:52 -07:00
koichik
8a729270c1 fix for --harmony_block_scoping
Fixes #1969.
2011-10-31 00:49:20 +09:00
koichik
a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00