mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
doc: cluster: worker.pid is now worker.process.pid
This commit is contained in:
parent
63c2391984
commit
fba1e48fae
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user