CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::service::UnixSignalService Class Reference

#include <UnixSignalService.h>

Public Member Functions

 UnixSignalService (ParameterSet const &ps)
 
 ~UnixSignalService ()
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Private Attributes

bool enableSigInt_
 

Detailed Description

Definition at line 20 of file UnixSignalService.h.

Constructor & Destructor Documentation

edm::service::UnixSignalService::UnixSignalService ( ParameterSet const &  ps)
explicit

Definition at line 15 of file UnixSignalService.cc.

References enableSigInt_, edm::ep_sigusr2(), and edm::installCustomHandler().

16  : enableSigInt_(pset.getUntrackedParameter<bool>("EnableCtrlC")) {
19  }
void installCustomHandler(int signum, CFUNC func)
void ep_sigusr2(int, siginfo_t *, void *)
edm::service::UnixSignalService::~UnixSignalService ( )

Definition at line 21 of file UnixSignalService.cc.

21 {}

Member Function Documentation

void edm::service::UnixSignalService::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 23 of file UnixSignalService.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and edm::ConfigurationDescriptions::setComment().

23  {
25  desc.addUntracked<bool>("EnableCtrlC", true)->setComment(
26  "If 'true', you can stop a cmsRun job gracefully by sending it a '<control> c' keyboard interrupt (i.e. SIGINT).");
27  descriptions.add("UnixSignalService", desc);
28  descriptions.setComment(
29  "This service sets up unix signal handlers for the unix signal SIGUSR2 and optionally SIGINT"
30  " so that when cmsRun is sent a signal the application will stop processing and shut down gracefully.");
31  }

Member Data Documentation

bool edm::service::UnixSignalService::enableSigInt_
private

Definition at line 28 of file UnixSignalService.h.

Referenced by UnixSignalService().