docs: fix child_process.send() example

This commit is contained in:
Ben Noordhuis
2011-10-12 17:44:12 +02:00
parent bc96302fae
commit 6ed8d41ddd

View File

@@ -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: