Public Member Functions

Lockfile Class Reference

#include <ink_lockfile.h>

Public Member Functions

 Lockfile (void)
 Lockfile (const char *filename)
 ~Lockfile (void)
void SetLockfileName (const char *filename)
const char * GetLockfileName (void)
int Open (pid_t *holding_pid)
int Get (pid_t *holding_pid)
void Close (void)
void Kill (int sig, int initial_sig=0, const char *pname=NULL)
void KillGroup (int sig, int initial_sig=0, const char *pname=NULL)

Detailed Description

Definition at line 34 of file ink_lockfile.h.


Constructor & Destructor Documentation

Lockfile::Lockfile ( void   )  [inline]

Definition at line 37 of file ink_lockfile.h.

Lockfile::Lockfile ( const char *  filename  )  [inline]

Definition at line 43 of file ink_lockfile.h.

References ink_strlcpy().

Lockfile::~Lockfile ( void   )  [inline]

Definition at line 48 of file ink_lockfile.h.


Member Function Documentation

void Lockfile::Close ( void   ) 

Definition at line 170 of file lockfile.cc.

Referenced by Kill(), and KillGroup().

int Lockfile::Get ( pid_t *  holding_pid  ) 

Definition at line 127 of file lockfile.cc.

References Open().

Referenced by check_lockfile().

const char* Lockfile::GetLockfileName ( void   )  [inline]

Definition at line 57 of file ink_lockfile.h.

void Lockfile::Kill ( int  sig,
int  initial_sig = 0,
const char *  pname = NULL 
)

Definition at line 219 of file lockfile.cc.

References Close(), lockfile_kill_internal(), and Open().

void Lockfile::KillGroup ( int  sig,
int  initial_sig = 0,
const char *  pname = NULL 
)

Definition at line 239 of file lockfile.cc.

References Close(), lockfile_kill_internal(), and Open().

int Lockfile::Open ( pid_t *  holding_pid  ) 

Definition at line 30 of file lockfile.cc.

References FAIL, and val.

Referenced by Get(), Kill(), and KillGroup().

void Lockfile::SetLockfileName ( const char *  filename  )  [inline]

Definition at line 52 of file ink_lockfile.h.

References ink_strlcpy().


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