Skip to content

Commit

Permalink
Removed remaining 2.x support. Closes #108
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 16, 2011
1 parent 4a9ed21 commit c79f0db
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/plugins/cli.js
Expand Up @@ -10,10 +10,7 @@
*/

var fs = require('fs')
, Log = require('log')
, ESRCH = process.version >= 'v0.4.0'
? require('constants').ESRCH
: process.ESRCH
, Log = require('log');

/**
* Commands.
Expand Down Expand Up @@ -68,13 +65,13 @@ exports = module.exports = function(){
// signal master
process.kill(pid, sig);
} catch (err) {
if (ESRCH != err.errno) throw err;
if ('ESRCH' != err.code) throw err;
// signal children individually
master.workerpids().forEach(function(pid){
try {
process.kill(pid, sig);
} catch (err) {
if (ESRCH != err.errno) throw err;
if ('ESRCH' != err.code) throw err;
}
});
}
Expand Down Expand Up @@ -155,7 +152,7 @@ define('-s, --status, status', function(master){
status = 'alive';
color = '36';
} catch (err) {
if (ESRCH == err.errno) {
if ('ESRCH' == err.code) {
color = '31';
status = 'dead';
} else {
Expand Down

0 comments on commit c79f0db

Please sign in to comment.