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

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: fix child_process.send() example
  • Loading branch information
bnoordhuis committed Oct 12, 2011
1 parent bc96302 commit 6ed8d41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/child_processes.markdown
Expand Up @@ -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:
Expand Down

0 comments on commit 6ed8d41

Please sign in to comment.