snaplock: snaplock::snaplock_info Class Reference

snaplock::snaplock_info Class Reference

Handle the SIGUSR1 Unix signal. More...

#include <snaplock.h>

Inheritance diagram for snaplock::snaplock_info:
Collaboration diagram for snaplock::snaplock_info:
Public Types typedef std::shared_ptr< snaplock_infopointer_t   Public Member Functions  snaplock_info (snaplock *sl)  The snaplock info initialization. More...
   snaplock_info (snaplock_info const &rhs)=delete   virtual ~snaplock_info () override   snaplock_info const & operator= (snaplock_info const &rhs)=delete   virtual void process_signal () override  Call the info function of the snaplock object. More...
  Private Attributes snaplockf_snaplock = nullptr   Detailed Description

This class is an implementation of the signalfd() specifically listening for the SIGUSR1 signal.

The signal is used to ask snaplock to print out information about its state.

Definition at line 111 of file snaplock.h.

Member Typedef Documentation
typedef std::shared_ptr<snaplock_info> snaplock::snaplock_info::pointer_t

Definition at line 115 of file snaplock.h.

Constructor & Destructor Documentation
snaplock::snaplock_info::snaplock_info ( snaplocksl)

The snaplock information object uses the signalfd() function to obtain a way to listen on incoming Unix signals.

Specifically, it listens on the SIGUSR1 signal. This is used to request snaplock to print out its current state. This is mainly for debug purposes.

Parameters
[in]slThe snaplock we are listening for.

Definition at line 76 of file snaplock_info.cpp.

snaplock::snaplock_info::snaplock_info ( snaplock_info const &  rhs) delete
virtual snaplock::snaplock_info::~snaplock_info ( ) inlineoverridevirtual

Definition at line 119 of file snaplock.h.

Member Function Documentation
snaplock_info const& snaplock::snaplock_info::operator= ( snaplock_info const &  rhs) delete
void snaplock::snaplock_info::process_signal ( ) overridevirtual

When this function is called, the internal state of the snaplock object gets printed out. It is expected to be used to debug the snaplock daemon.

This signal can be sent any number of times.

Note that state is printed using the log mechanism. If your logs are not being printed in your console, then make sure to look at the snaplock.log file (or whatever you renamed it if you did so in the snaplock.properties.)

Definition at line 98 of file snaplock_info.cpp.

References f_snaplock, and snaplock::snaplock::info().

Member Data Documentation
snaplock* snaplock::snaplock_info::f_snaplock = nullptr private

Definition at line 127 of file snaplock.h.

Referenced by process_signal().


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

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly