Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Replace 'killall -9' with 'killall' for non-Windows OSes
Browse files Browse the repository at this point in the history
As per the current MongoDB docs and issue:
https://docs.mongodb.com/v3.4/tutorial/manage-mongodb-processes/#use-kill
#6

Just not sure about possible downstream users of this, i.e. whether anyone using mongodb-runner for instance might be relying on it in some edge case. Perhaps a major semver bump?
  • Loading branch information
pzrq committed Mar 15, 2017
1 parent ebbb7e4 commit d8c7d39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -4,7 +4,7 @@ var windows = require('os').platform() === 'win32';
var exec = require('child_process').exec;

var commands = ['mongod', 'mongo', 'mongos'].map(function(name) {
return windows ? 'taskkill /F /IM ' + name + '.exe' : 'killall -9 ' + name;
return windows ? 'taskkill /F /IM ' + name + '.exe' : 'killall ' + name;
});

module.exports = function(done) {
Expand Down
6 changes: 3 additions & 3 deletions test/index.test.js
Expand Up @@ -12,9 +12,9 @@ describe('kill-mongodb', function() {
]);
} else {
assert.deepEqual(kill.commands, [
'killall -9 mongod',
'killall -9 mongo',
'killall -9 mongos'
'killall mongod',
'killall mongo',
'killall mongos'
]);
}
});
Expand Down

0 comments on commit d8c7d39

Please sign in to comment.