<commit_before>#include "lxc_isolation_module.hpp"

#include <algorithm>

#include "foreach.hpp"

using std::cerr;
using std::cout;
using std::endl;
using std::list;
using std::make_pair;
using std::max;
using std::ostringstream;
using std::pair;
using std::queue;
using std::string;
using std::vector;

using boost::lexical_cast;
using boost::unordered_map;
using boost::unordered_set;

using namespace nexus;
using namespace nexus::internal;
using namespace nexus::internal::slave;


LxcIsolationModule::LxcIsolationModule(Slave* slave)
{
  this->slave = slave;
  reaper = new Reaper(this);
  Process::spawn(reaper);
}


LxcIsolationModule::~LxcIsolationModule()
{
  // We want to wait until the reaper has completed because it<commit_msg>Check for LXC tools before running LXC isolation module.<commit_after>#include "lxc_isolation_module.hpp"

#include <stdlib.h>
#include <unistd.h>

#include <algorithm>

#include "foreach.hpp"

using std::cerr;
using std::cout;
using std::endl;
using std::list;
using std::make_pair;
using std::max;
using std::ostringstream;
using std::pair;
using std::queue;
using std::string;
using std::vector;

using boost::lexical_cast;
using boost::unordered_map;
using boost::unordered_set;

using namespace nexus;
using namespace nexus::internal;
using namespace nexus::internal::slave;


LxcIsolationModule::LxcIsolationModule(Slave* slave)
{
  this->slave = slave;
  reaper = new Reaper(this);
  Process::spawn(reaper);

  // Run a basic check to see whether Linux Container tools are available
  if (system("lxc-version > /dev/null") != 0) {
    PLOG(FATAL) << "Could not run lxc-version; make sure Linux Container "
                << "tools are installed";
  }
}


LxcIsolationModule::~LxcIsolationModule()
{
  // We want to wait until the reaper has completed because it
{'fraction_non_alphanumeric': 0.12375690607734807, 'fraction_numerical': 0.0005524861878453039, 'mean_word_length': 5.80827067669173, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4984260', 'n_tokens_mistral': 606, 'n_tokens_neox': 593, 'n_words': 165}