Closed Hamms closed 13 years ago
os
should be undefined for node 0.2.x, works fine for me with both version of node :s
I'm on node 0.4.0; is that the problem?
I should clarify; os is definitely defined, and when I sys.inspect os.cpus, I see { [Function]
[length]: 0,
[name]: '',
[prototype]: { [constructor]: [Circular] },
[caller]: null }
But it returns undefined when called.
closing since its a node thing
I'm using the simple example app.js you give; server.js is just var cluster = require('cluster') cluster('./app').listen(8001)
I get the following error:
It looks like os.cpus() is undefined in if (!this.has('workers')) { this.set('workers', os ? os.cpus().length : 1); }