snaplock: snaplock::snaplock_interrupt Class Reference

snaplock::snaplock_interrupt Class Reference

Handle the SIGINT Unix signal. More...

#include <snaplock.h>

Inheritance diagram for snaplock::snaplock_interrupt:
Collaboration diagram for snaplock::snaplock_interrupt:
Public Types typedef std::shared_ptr< snaplock_interruptpointer_t   Public Member Functions  snaplock_interrupt (snaplock *sl)  The interrupt initialization. More...
   snaplock_interrupt (snaplock_interrupt const &rhs)=delete   virtual ~snaplock_interrupt () override   snaplock_interruptoperator= (snaplock_interrupt const &rhs)=delete   virtual void process_signal () override  Call the stop 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 SIGINT signal.

Definition at line 69 of file snaplock.h.

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

Definition at line 73 of file snaplock.h.

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

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

Specifically, it listens on the SIGINT signal, which is the equivalent to the Ctrl-C.

[in]slThe snaplock server we are listening for.

Definition at line 71 of file snaplock_interrupt.cpp.

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

Definition at line 77 of file snaplock.h.

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

When this function is called, the signal was received and thus we are asked to quit as soon as possible.

Definition at line 85 of file snaplock_interrupt.cpp.

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

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

Definition at line 85 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