diff --git a/src/backups.js b/src/backups.js index 54fe2f5be..4ee32f681 100644 --- a/src/backups.js +++ b/src/backups.js @@ -856,7 +856,7 @@ function runBackupUpload(uploadConfig, progressCallback, callback) { let result = ''; // the script communicates error result as a string - shell.sudo(`backup-${backupId}`, [ BACKUP_UPLOAD_CMD, backupId, format, dataLayout.toString() ], { preserveEnv: true, ipc: true, nice: 15 }, function (error) { + shell.sudo(`backup-${backupId}`, [ BACKUP_UPLOAD_CMD, backupId, format, dataLayout.toString() ], { preserveEnv: true, ipc: true }, function (error) { if (error && (error.code === null /* signal */ || (error.code !== 0 && error.code !== 50))) { // backuptask crashed return callback(new BoxError(BoxError.INTERNAL_ERROR, 'Backuptask crashed')); } else if (error && error.code === 50) { // exited with error diff --git a/src/shell.js b/src/shell.js index 81342e465..20d1588e8 100644 --- a/src/shell.js +++ b/src/shell.js @@ -14,7 +14,6 @@ var assert = require('assert'), util = require('util'); const SUDO = '/usr/bin/sudo'; -const NICE = '/usr/bin/nice'; function exec(tag, cmd, callback) { assert.strictEqual(typeof tag, 'string'); @@ -42,11 +41,6 @@ function spawn(tag, file, args, options, callback) { if (options.ipc) options.stdio = ['pipe', 'pipe', 'pipe', 'ipc']; - if (options.nice) { - args = ['-n', options.nice, file].concat(args); - file = NICE; - } - debug(tag + ' spawn: %s %s', file, args.join(' ')); const cp = child_process.spawn(file, args, options); diff --git a/src/tasks.js b/src/tasks.js index fc499f6e6..f28224025 100644 --- a/src/tasks.js +++ b/src/tasks.js @@ -40,7 +40,6 @@ exports = module.exports = { let assert = require('assert'), async = require('async'), BoxError = require('./boxerror.js'), - child_process = require('child_process'), debug = require('debug')('box:tasks'), path = require('path'), paths = require('./paths.js'),