Permalink
Browse files

Removed remaining 2.x support. Closes #108

  • Loading branch information...
1 parent 4a9ed21 commit c79f0db07087c410c7fc4b6c1ee024b194c63ca9 @tj tj committed Aug 16, 2011
Showing with 4 additions and 7 deletions.
  1. +4 −7 lib/plugins/cli.js
View
@@ -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.
@@ -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;
}
});
}
@@ -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 {

0 comments on commit c79f0db

Please sign in to comment.