mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
393 B
17 lines
393 B
10 years ago
|
// child process that listens on a socket, allows testing of an EADDRINUSE condition
|
||
|
|
||
|
var common = require('../common');
|
||
|
var net = require('net');
|
||
|
|
||
|
var server = net.createServer().listen(common.PIPE, function() {
|
||
|
console.log('child listening');
|
||
|
process.send('listening');
|
||
|
});
|
||
|
|
||
|
function onmessage() {
|
||
|
console.log('child exiting');
|
||
|
server.close();
|
||
|
}
|
||
|
|
||
|
process.once('message', onmessage);
|