Joshua Holbrook
56cfcea4b4
child_process: remove dummy "setsid" option setting
2012-02-29 02:10:56 +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
Ryan Dahl
651b8a06d6
Fix test/pummel/test-exec.js
2011-10-12 16:12:24 -07:00
Daniel Ennis
59be975322
Improve IPC performance.
...
Reading of JSON data off the buffer, 10-15% performance increase.
Fixes #1864 .
2011-10-12 15:06:51 -07:00
Ryan Dahl
96e423a665
Remove child_process_legacy
2011-10-11 13:16:33 -07:00
Ryan Dahl
7772f21b60
initial pass at lib/child_process_uv.js
2011-07-31 15:58:10 -07:00
Ryan Dahl
02699a3a8e
net_uv: child process use net_legacy; recognize NODE_USE_UV=1 env var
2011-06-20 15:51:03 +02:00
Ryan Dahl
0271b785a1
fork: Use utf8 for channel encoding
2011-05-17 10:51:30 -07:00
Ryan Dahl
337c48db5f
Rename spawnNode to fork
2011-05-11 13:32:40 -07:00
Ryan Dahl
9e26dab150
child_process.spawnNode
...
For making easy worker processes.
2011-05-11 02:24:48 -07:00
Ryan Dahl
55048cdf79
Update copyright headers
2011-03-14 17:37:05 -07:00
Nathan Rajlich
a9a252fda9
Read up the prototype of the 'env' object.
...
Closes GH-713.
2011-02-24 16:36:23 -08:00
Ryan Dahl
cb06abe1e5
Helpful error when child_process.exec hit maxBuffer
2011-01-27 17:45:17 -08:00
Ryan Dahl
9e976abad9
lint
2011-01-24 10:55:30 -08:00
Bert Belder
6ad629895d
Make child_process.kill always work on windows
2011-01-18 04:58:32 +01:00
isaacs
6f5d95de6d
child_process: Add gid/uid flags to spawn config
...
This is mostly working, but not completely ideal for two reasons.
1. Rather than emitting an error on the ChildProcess object when the
setgid/setuid fails, it is simply printing the error to stderr and
exiting. The same happens with the cwd, so that's not completely
terrible.
2. I don't have a good test for this. It fails with an EPERM if you try
to change the uid or gid as a non-root user.
2011-01-11 10:02:58 -08:00
Ryan Dahl
63bd237892
typo setuid -> setsid
2011-01-10 17:15:17 -08:00
Ryan Dahl
202dd8387f
Add setsid option to child_process
2011-01-10 16:24:49 -08:00
Ryan Dahl
11ea8da9c3
lint child_process.js
2010-12-01 16:56:03 -08:00
Travis Swicegood
22cf5a24db
Simplify execution from "big if statement"
...
This code is functionally equivalent, but in a simpler form. Now new
parameters to `execFile` do not require `exec` to be refactored.
2010-11-29 17:46:46 -08:00
Travis Swicegood
e514f575f3
Remove cruft that dealt with env parameter
...
Originally added in commit 078a48a9
, this code dealt with an optional
env parameter that was passed to `exec`. The parameter was removed, but
this code was left. As it serves no purpose, removing it.
2010-11-29 17:43:27 -08:00
Travis Swicegood
86727b15f3
fix a typo in comment
...
fixes issue 464
2010-11-29 17:07:30 -08:00
Ryan Dahl
9bf2975f78
Make sure Error object on exec() gets killed member
...
Also default to SIGTERM for destruction when exceeding timeout or buffer on
exec()
2010-10-23 11:37:40 -07:00
Ryan Dahl
6570cd99e5
Fix execFile timeouts, improve tests
...
It seems that a parent will not get a SIGCHLD if the child is killed by the
parent? It's unclear, so make 'exit' callback manually.
2010-10-20 19:20:52 -07:00
Ryan Dahl
5a98fa4809
ChildProcesses cannot be killed if pid is missing
2010-10-20 17:55:25 -07:00