#include <UnixSignalService.h>
Public Member Functions | |
UnixSignalService (ParameterSet const &ps) | |
~UnixSignalService () | |
Static Public Member Functions | |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
Private Attributes | |
bool | enableSigInt_ |
Definition at line 20 of file UnixSignalService.h.
edm::service::UnixSignalService::UnixSignalService | ( | ParameterSet const & | ps | ) | [explicit] |
Definition at line 15 of file UnixSignalService.cc.
References enableSigInt_, edm::ep_sigusr2(), and edm::installCustomHandler().
: enableSigInt_(pset.getUntrackedParameter<bool>("EnableCtrlC")) { installCustomHandler(SIGUSR2, ep_sigusr2); if(enableSigInt_) installCustomHandler(SIGINT, ep_sigusr2); }
edm::service::UnixSignalService::~UnixSignalService | ( | ) |
Definition at line 21 of file UnixSignalService.cc.
{}
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().
{ ParameterSetDescription desc; desc.addUntracked<bool>("EnableCtrlC", true)->setComment( "If 'true', you can stop a cmsRun job gracefully by sending it a '<control> c' keyboard interrupt (i.e. SIGINT)."); descriptions.add("UnixSignalService", desc); descriptions.setComment( "This service sets up unix signal handlers for the unix signal SIGUSR2 and optionally SIGINT" " so that when cmsRun is sent a signal the application will stop processing and shut down gracefully."); }
bool edm::service::UnixSignalService::enableSigInt_ [private] |
Definition at line 28 of file UnixSignalService.h.
Referenced by UnixSignalService().