sbuild-lock.cc File Reference

#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>

Include dependency graph for sbuild-lock.cc:


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 Documentation

typedef std::pair<lock::error_code,const char *> emap [static]


Function Documentation

void @40::alarm_handler ( int  ignore  )  [static]

Handle the SIGALRM signal.

Parameters:
ignore the signal number.


Variable Documentation

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%)"))
    }
This is a list of the supported error codes.

It's used to construct the real error codes map.

volatile bool lock_timeout = false [static]

Set to true when a SIGALRM is received.

Referenced by sbuild::device_lock::set_lock().


Generated on Mon May 5 09:26:13 2008 for sbuild by  doxygen 1.5.5