Belle II Software development
ProcessSubmitter Class Reference

Public Member Functions

 ProcessSubmitter (ProcessController *con, int iopipe[2])
 
void run ()
 

Private Attributes

ProcessControllerm_con
 
int m_iopipe [2]
 

Detailed Description

Definition at line 108 of file ProcessController.h.

Constructor & Destructor Documentation

◆ ProcessSubmitter()

ProcessSubmitter ( ProcessController con,
int  iopipe[2] 
)
inline

Definition at line 111 of file ProcessController.h.

112 : m_con(con)
113 {
114 m_iopipe[0] = iopipe[0];
115 m_iopipe[1] = iopipe[1];
116 }

Member Function Documentation

◆ run()

void run ( )

Definition at line 155 of file ProcessController.cc.

156{
157 //close(1);
158 dup2(m_iopipe[1], 1);
159 //close(2);
160 dup2(m_iopipe[1], 2);
161 close(m_iopipe[0]);
162 Executor executor;
163 if (m_con->getExecutable().size() == 0) {
164 m_con->setExecutable("basf2");
165 }
166 executor.setExecutable(m_con->getExecutable());
167 for (size_t i = 0; i < m_con->m_arg_v.size(); i++) {
168 executor.addArg(m_con->m_arg_v[i]);
169 }
170 executor.execute();
171}

Member Data Documentation

◆ m_con

ProcessController* m_con
private

Definition at line 122 of file ProcessController.h.

◆ m_iopipe

int m_iopipe[2]
private

Definition at line 123 of file ProcessController.h.


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