CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UnixSignalService.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <cstdlib>
3 
6 
10 
11 namespace edm {
12 
13  namespace service {
14 
16  : enableSigInt_(pset.getUntrackedParameter<bool>("EnableCtrlC")) {
19  }
20 
22 
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  }
32  } // end of namespace service
33 } // end of namespace edm
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
void installCustomHandler(int signum, CFUNC func)
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void ep_sigusr2(int, siginfo_t *, void *)
UnixSignalService(ParameterSet const &ps)