Belle II Software development
ProcessListener Class Reference

Public Member Functions

 ProcessListener (ProcessController *con)
 
void run ()
 

Private Attributes

ProcessControllerm_con
 

Detailed Description

Definition at line 19 of file ProcessListener.h.

Constructor & Destructor Documentation

◆ ProcessListener()

Definition at line 22 of file ProcessListener.h.

23 : m_con(con) {}

◆ ~ProcessListener()

~ProcessListener ( )
inline

Definition at line 24 of file ProcessListener.h.

24{}

Member Function Documentation

◆ run()

void run ( )

Definition at line 18 of file ProcessListener.cc.

19{
20 Process& process(m_con->getProcess());
21 std::string process_name = m_con->getParName();
22 RCCallback& callback(*(m_con->getCallback()));
23 if (not process.wait()) {
24 callback.log(LogFile::FATAL, "Failed to wait processed process %s",
25 process_name.c_str());
26 return;
27 }
28 callback.log(LogFile::DEBUG, process_name + " : termineted");
29 callback.log(LogFile::DEBUG, "%s : waitpid_returned %d status = %d", process_name.c_str(), process.waitpid_result(),
30 process.waitpid_status());
31 process.set_id(-1);
32 callback.set(m_con->getParName() + ".pid", -1);
33 /*
34 try {
35 callback.monitor();
36 } catch (const RCHandlerFatalException& e) {
37 callback.log(LogFile::FATAL, e.what());
38 } catch (const RCHandlerException& e) {
39 callback.log(LogFile::ERROR, e.what());
40 } catch (const std::exception& e) {
41 callback.log(LogFile::FATAL, "Unknown exception: %s. terminating process", e.what());
42 }
43 */
44}

Member Data Documentation

◆ m_con

ProcessController* m_con
private

Definition at line 30 of file ProcessListener.h.


The documentation for this class was generated from the following files: