benchmarks/vendor/forever/node_modules/daemon/src/daemon.cc
//
// Set the chroot of this process. You probably want to be sure stuff is in here.
//   chroot (folder)
//   @folder {string}: The new root
//
Set the chroot of this process. You probably want to be sure stuff is in here.
chroot (folder)
@folder {string}: The new root
Set the chroot of this process . You probably want to be sure stuff is in here . chroot ( folder ) @folder { string } : The new root
Handle<Value> Chroot(const Arguments& args) {
  if (args.Length() < 1) {
    return ThrowException(Exception::TypeError(
      String::New("Must have one argument; a string of the folder to chroot to.")
    ));
  }
  uid_t uid;
  int rv;
  String::Utf8Value folderUtf8(args[0]->ToString());
  const char *folder = ToCString(folderUtf8);
  rv = chroot(folder);
  if (rv != 0) {
    return ThrowException(ErrnoException(errno, "chroot"));
  }
  chdir("/");
  return Boolean::New(true);
}
Handle < Value > Chroot ( const Arguments & args ) { if ( args . Length ( ) < 1 ) { return ThrowException ( Exception :: TypeError ( String :: New ( " " ) ) ) ; } uid_t uid ; int rv ; String :: Utf8Value folderUtf8 ( args [ 0 ] -> ToString ( ) ) ; const char * folder = ToCString ( folderUtf8 ) ; rv = chroot ( folder ) ; if ( rv != 0 ) { return ThrowException ( ErrnoException ( errno , " " ) ) ; } chdir ( " " ) ; return Boolean :: New ( true ) ; }
Set the chroot of this process.
Set the chroot of this process .