Developer documentation
Version 3.0.3-105-gd3941f44
MR::SignalHandler Namespace Reference

Typedefs

using cleanup_function_type = void(*)()
 the type of function expected for on_signal() More...
 

Functions

void init ()
 set up the signal handler More...
 
void on_signal (cleanup_function_type func)
 add function to be run when a signal is received and at program exit More...
 
void mark_file_for_deletion (const std::string &filename)
 mark the file for deletion when a signal is received or at program exit More...
 
void unmark_file_for_deletion (const std::string &filename)
 unmark the file from deletion More...
 

Typedef Documentation

◆ cleanup_function_type

using MR::SignalHandler::cleanup_function_type = typedef void(*)()

the type of function expected for on_signal()

Definition at line 27 of file signal_handler.h.

Function Documentation

◆ init()

void MR::SignalHandler::init ( )

set up the signal handler

◆ mark_file_for_deletion()

void MR::SignalHandler::mark_file_for_deletion ( const std::string &  filename)

mark the file for deletion when a signal is received or at program exit

◆ on_signal()

void MR::SignalHandler::on_signal ( cleanup_function_type  func)

add function to be run when a signal is received and at program exit

◆ unmark_file_for_deletion()

void MR::SignalHandler::unmark_file_for_deletion ( const std::string &  filename)

unmark the file from deletion