Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
documented the silent option
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasMadsen committed Nov 26, 2011
1 parent d2ee4c4 commit d67b570
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions doc/api/child_processes.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,9 @@ And then the child script, `'sub.js'` might look like this:
In the child the `process` object will have a `send()` method, and `process`
will emit objects each time it receives a message on its channel.

By default the spawned Node process will have the stdin, stdout, stderr
associated with the parent's.
By default the spawned Node process will have the stdout, stderr associated
with the parent's. To change this behavior set the `silent` property in the
`options` object to `true`.

These child Nodes are still whole new instances of V8. Assume at least 30ms
startup and 10mb memory for each new Node. That is, you cannot create many
Expand Down
6 changes: 3 additions & 3 deletions doc/api/cluster.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,17 @@ Example:
cluster.setupMaster({
exec : "worker.js",
args : ["--use", "https"],
workers : 2
workers : 2,
silent : true
});
cluster.autoFork();

The options argument can contain 3 different properties.

`exec` and `args` are used when forking a new worker.

- `exec` are the file path to the worker file, by default this is the same file as the master.
- `args` are a array of arguments send along with the worker, by default this is `process.argv.slice(2)`.
- `workers` are the number of worker there will be created when using `autoFork()`
- `silent`, if this option is true the output of a worker won't propagate to the master, by default this is false.

## Worker

Expand Down

0 comments on commit d67b570

Please sign in to comment.