lib/index.js
function chrootSpawn(command, argv, opts, callback)
{
  argv = [opts.uid, opts.gid, command].concat(argv)

  const options =
  {
    cwd: opts.cwd,
    env: opts.env,
    stdio: 'inherit'
  }

  proc.spawn(`${__dirname}/chrootSpawn`, argv, options).on('exit', callback)
}
function chrootSpawn(command, argv, opts, callback)
{
  argv = [opts.uid, opts.gid, command].concat(argv)

  const options =
  {
    cwd: opts.cwd,
    env: opts.env,
    stdio: 'inherit'
  }

  proc.spawn(`${__dirname}/chrootSpawn`, argv, options).on('exit', callback)
}
function chrootSpawn ( command , argv , opts , callback ) { argv = [ opts . uid , opts . gid , command ] . concat ( argv ) const options = { cwd : opts . cwd , env : opts . env , stdio : 'inherit' } proc . spawn ( ` ${ __dirname } ` , argv , options ) . on ( 'exit' , callback ) }
Exec a command on a `chroot`ed directory with un-priviledged permissions

@param {String}   command Path of the command file inside the home folder
@param {String[]} [argv]  Command arguments
@param {Object}   [opts]  Extra options
@param {Function} callback
Exec a command on a chroot ed directory with un - priviledged permissions