Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Merge branch 'drop-0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
mash committed Apr 24, 2014
2 parents 3a1d630 + 8fa337e commit 4c1d2b4
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 28 deletions.
13 changes: 1 addition & 12 deletions index.js
Expand Up @@ -2,7 +2,6 @@ var fs = require("fs")
, path = require("path")
, cluster = require("cluster")
, numCPUs = require("os").cpus().length
, isNode06 = process.version.match( /v0\.6/ )
;

function log() {
Expand Down Expand Up @@ -157,23 +156,13 @@ function startServer (server, options) {
deletePIDFile( options.pidfile );

eachWorkers( workers, function(worker) {
if ( isNode06 ) {
worker.kill();
}
else {
worker.destroy();
}
worker.destroy();
});
});

log( "master will fork "+options.workers+" workers" );

cluster.on( "death", function (worker) {
// for v0.6
onWorkerDeath( worker, workers );
});
cluster.on( "exit", function (worker) {
// for v0.8
onWorkerDeath( worker, workers );
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -23,7 +23,7 @@
"test": "make test"
},
"engines": {
"node": "*"
"node": ">= 0.8"
},
"dependencies": {
"minimist" : ">= 0.0",
Expand Down
5 changes: 0 additions & 5 deletions test/01_restart_app.js
Expand Up @@ -63,11 +63,6 @@ function runTest (port) {
});
}

if ( process.version.match(/v0\.6/) ) {
// cheat, 0.6 doesn't have cluster.workers, so forget them
console.log( "Result: PASS" );
process.exit(0);
}
// worker tells master where the worker is listening on
// master uses that port to request
if ( cluster.isMaster ) {
Expand Down
5 changes: 0 additions & 5 deletions test/02_accidental_death.js
Expand Up @@ -72,11 +72,6 @@ function runTest (port) {
});
}

if ( process.version.match(/v0\.6/) ) {
// cheat, 0.6 doesn't have cluster.workers, so forget them
console.log( "Result: PASS" );
process.exit(0);
}
// worker tells master where the worker is listening on
// master uses that port to request
if ( cluster.isMaster ) {
Expand Down
5 changes: 0 additions & 5 deletions test/03_max_requests_per_child.js
Expand Up @@ -57,11 +57,6 @@ function runTest (port) {
});
}

if ( process.version.match(/v0\.6/) ) {
// cheat, 0.6 doesn't have cluster.workers, so forget them
console.log( "Result: PASS" );
process.exit(0);
}
// worker tells master where the worker is listening on
// master uses that port to request
if ( cluster.isMaster ) {
Expand Down

0 comments on commit 4c1d2b4

Please sign in to comment.