Skip to content

Commit

Permalink
hopefully the final fix for nice/renice invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
schaermu committed Mar 8, 2012
1 parent e708c06 commit 9dc8b4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ exports = module.exports = function Processor(command) {

if (self.options._nice.level) {
// execute ffmpeg through nice
exec('nice -n=' + self.options._nice.level + ' ' + helper.determineFfmpegPath() + ' ' + tnArgs.join(' '), taskcallback);
exec('nice -n ' + self.options._nice.level + ' ' + helper.determineFfmpegPath() + ' ' + tnArgs.join(' '), taskcallback);
} else {
exec(helper.determineFfmpegPath() + ' ' + tnArgs.join(' '), taskcallback);
}
Expand Down Expand Up @@ -310,7 +310,7 @@ exports = module.exports = function Processor(command) {
if (this.options._nice.level) {
var niceLvl = (this.options._nice.level > 0 ? '+' + this.options._nice.level : this.options._nice.level);
// renice the spawned process without waiting for callback
exec('renice -n ' + niceLvl + ' -p ' + retProc.pid, function(err, stderr, stdout) {
exec('renice ' + niceLvl + ' -p ' + retProc.pid, function(err, stderr, stdout) {
//console.log('successfully reniced process with pid ' + retProc.pid + ' to ' + niceLvl + ' niceness!');
});
}
Expand Down

0 comments on commit 9dc8b4c

Please sign in to comment.