mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
docs: fix child_process.send() example
This commit is contained in:
@@ -234,7 +234,9 @@ another process. Child will receive the handle as as second argument to the
|
||||
var server = require('net').createServer();
|
||||
var child = require('child_process').fork(__dirname + '/child.js');
|
||||
// Open up the server object and send the handle.
|
||||
child.send({ server: true }, server._handle);
|
||||
server.listen(1337, function() {
|
||||
child.send({ server: true }, server._handle);
|
||||
});
|
||||
|
||||
Here is an example of receiving the server handle and sharing it between
|
||||
processes:
|
||||
|
||||
Reference in New Issue
Block a user