<commit_before>/*
 *   Copyright (C) 2014 Pelagicore AB
 *   All rights reserved.
 */
#include <glibmm.h>
#include <dbus-c++/dbus.h>
#include <dbus-c++/glib-integration.h>

#include <signal.h>
#include <unistd.h>
#include "CommandLineParser.h"
#include "log.h"
#include "paminterface.h"
#include "pelagicontain.h"
#include "pelagicontaintodbusadapter.h"
#include "dbusmainloop.h"
#include "generators.h" /* used for gen_ct_name */
#include "pulsegateway.h"
#include "networkgateway.h"
#include "dbusgateway.h"
#include <sys/stat.h>
#include "systemcallinterface.h"
#include "devicenodegateway.h"

LOG_DEFINE_APP_IDS("PCON", "Pelagicontain");
LOG_DECLARE_DEFAULT_CONTEXT(Pelagicontain_DefaultLogContext, "PCON", "Main context");

#ifndef CONFIG
    #error Must define CONFIG; path to configuration file (/etc/pelagicontain?)
#endif

/* These has to be global in order to be reachable from the signal handler */
static Pelagicontain *pelagicontain;
static pid_t pcPid;
static std::string containerDir;

/**
 * Remove the dirs created by main when we cleanup
 */
void removeDirs()<commit_msg>main.cpp: Surrounded gateway includes with #ifdef<commit_after>/*
 *   Copyright (C) 2014 Pelagicore AB
 *   All rights reserved.
 */
#include <glibmm.h>
#include <dbus-c++/dbus.h>
#include <dbus-c++/glib-integration.h>

#include <signal.h>
#include <unistd.h>
#include "CommandLineParser.h"
#include "log.h"
#include "paminterface.h"
#include "pelagicontain.h"
#include "pelagicontaintodbusadapter.h"
#include "dbusmainloop.h"
#include "generators.h" /* used for gen_ct_name */

#ifdef ENABLE_PULSEGW
#include "pulsegateway.h"
#endif

#ifdef ENABLE_NETGW
#include "networkgateway.h"
#endif

#ifdef ENABLE_DBUSGW
#include "dbusgateway.h"
#endif

#include <sys/stat.h>
#include "systemcallinterface.h"

#ifdef ENABLE_DEVICENODEGW
#include "devicenodegateway.h"
#endif

LOG_DEFINE_APP_IDS("PCON", "Pelagicontain");
LOG_DECLARE_DEFAULT_CONTEXT(Pelagicontain_DefaultLogContext, "PCON", "Main context");

#ifndef CONFIG
    #error Must define CONFIG; path to configuration file (/etc/pelagicontain?)
#endif

/* These has to be global in order to be reachable from the signal handler */
static Pelagicontain *pelagicontain;
static pid_t pcPid;
static std::string containerDir;

/**
 * Remove the dirs created by main when we cleanup
 */
void removeDirs()
{'fraction_non_alphanumeric': 0.12623020967051776, 'fraction_numerical': 0.0034231921266581087, 'mean_word_length': 5.718390804597701, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5186410', 'n_tokens_mistral': 872, 'n_tokens_neox': 837, 'n_words': 216}