#include <config.h>
#include "sbuild-lock.h"
#include "sbuild-log.h"
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include <boost/format.hpp>
#include <lockdev.h>
Typedefs | |
typedef std::pair < lock::error_code, const char * > | emap |
Functions | |
void | alarm_handler (int ignore) |
Handle the SIGALRM signal. | |
Variables | |
emap | init_errors [] |
This is a list of the supported error codes. | |
volatile bool | lock_timeout = false |
Set to true when a SIGALRM is received. |
typedef std::pair<lock::error_code,const char *> emap [static] |
void @40::alarm_handler | ( | int | ignore | ) | [static] |
Handle the SIGALRM signal.
ignore | the signal number. |
emap init_errors[] [static] |
Initial value:
{ emap(lock::TIMEOUT_HANDLER, N_("Failed to set timeout handler")), emap(lock::TIMEOUT_SET, N_("Failed to set timeout")), emap(lock::TIMEOUT_CANCEL, N_("Failed to cancel timeout")), emap(lock::LOCK, N_("Failed to lock file")), emap(lock::UNLOCK, N_("Failed to unlock file")), emap(lock::LOCK_TIMEOUT, N_("Failed to lock file (timed out after %4% seconds)")), emap(lock::UNLOCK_TIMEOUT, N_("Failed to unlock file (timed out after %4% seconds)")), emap(lock::DEVICE_LOCK, N_("Failed to lock device")), emap(lock::DEVICE_LOCK_TIMEOUT, N_("Failed to lock device (timed out after %4% seconds; lock held by PID %5%)")), emap(lock::DEVICE_TEST, N_("Failed to test device lock")), emap(lock::DEVICE_UNLOCK, N_("Failed to unlock device")), emap(lock::DEVICE_UNLOCK_TIMEOUT, N_("Failed to unlock device (timed out after %4% seconds; lock held by PID %5%)")) }
It's used to construct the real error codes map.
volatile bool lock_timeout = false [static] |