Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vasum::Server Class Reference

#include <server.hpp>

Public Member Functions

 Server (const std::string &configPath)
 
void run (bool asRoot)
 Starts all the zones and blocks until SIGINT, SIGTERM or SIGUSR1. More...
 
void reloadIfRequired (char *argv[])
 Reload the server by launching execve on itself if SIGUSR1 was sent to server. More...
 
void terminate ()
 Terminates the server. More...
 

Static Public Member Functions

static bool checkEnvironment ()
 Check server runtime environment. More...
 

Private Member Functions

void handleUpdate ()
 
void handleStop ()
 

Static Private Member Functions

static bool prepareEnvironment (const std::string &configPath, bool runAsRoot)
 Set needed caps, groups and drop root privileges. More...
 

Private Attributes

bool mIsRunning
 
bool mIsUpdate
 
std::string mConfigPath
 
utils::ScopedGlibLoop loop
 
cargo::ipc::epoll::EventPoll mEventPoll
 
utils::SignalFD mSignalFD
 
ZonesManager mZonesManager
 
::pthread_t mDispatchingThread
 

Constructor & Destructor Documentation

vasum::Server::Server ( const std::string &  configPath)

Member Function Documentation

bool vasum::Server::checkEnvironment ( )
static

Check server runtime environment.

void vasum::Server::handleStop ( )
private
void vasum::Server::handleUpdate ( )
private
bool vasum::Server::prepareEnvironment ( const std::string &  configPath,
bool  runAsRoot 
)
staticprivate

Set needed caps, groups and drop root privileges.

void vasum::Server::reloadIfRequired ( char *  argv[])

Reload the server by launching execve on itself if SIGUSR1 was sent to server.

void vasum::Server::run ( bool  asRoot)

Starts all the zones and blocks until SIGINT, SIGTERM or SIGUSR1.

void vasum::Server::terminate ( )

Terminates the server.

Equivalent of sending SIGINT or SIGTERM signal

Member Data Documentation

utils::ScopedGlibLoop vasum::Server::loop
private
std::string vasum::Server::mConfigPath
private
::pthread_t vasum::Server::mDispatchingThread
private
cargo::ipc::epoll::EventPoll vasum::Server::mEventPoll
private
bool vasum::Server::mIsRunning
private
bool vasum::Server::mIsUpdate
private
utils::SignalFD vasum::Server::mSignalFD
private
ZonesManager vasum::Server::mZonesManager
private

The documentation for this class was generated from the following files: