doc: cluster: worker.pid is now worker.process.pid

This commit is contained in:
Justin Plock 2012-07-01 12:35:51 -03:00 committed by Ben Noordhuis
parent 63c2391984
commit fba1e48fae
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ all share server ports.
}
cluster.on('exit', function(worker, code, signal) {
console.log('worker ' + worker.pid + ' died');
console.log('worker ' + worker.process.pid + ' died');
});
} else {
// Workers can share any TCP connection
@ -201,7 +201,7 @@ This can be used to restart the worker by calling `fork()` again.
cluster.on('exit', function(worker, code, signal) {
var exitCode = worker.process.exitCode;
console.log('worker ' + worker.pid + ' died ('+exitCode+'). restarting...');
console.log('worker ' + worker.process.pid + ' died ('+exitCode+'). restarting...');
cluster.fork();
});