Belle II Software  release-05-02-19
RFProcessManager.h
1 #pragma once
2 //+
3 // File : RFProcessManager.h
4 // Description : Manages process forking for RFARM control clients
5 //
6 // Author : Ryosuke Itoh, IPNS, KEK
7 // Date : 20 - June - 2013
8 //-
9 
10 #include <stdio.h>
11 #include <sys/types.h>
12 
13 #include <vector>
14 
15 
16 namespace Belle2 {
23  public:
24  RFProcessManager(char* nodename);
25  virtual ~RFProcessManager();
26 
27  // Signal handler
28  static void signal_handler(int num);
29 
30  // Execute script in a child process
31  int Execute(char* script, int nargs, char** args);
32  int Execute(char* scr, char* arg0 = NULL, char* arg1 = NULL, char* arg2 = NULL, char* arg3 = NULL, char* arg4 = NULL,
33  char* arg5 = NULL, char* arg6 = NULL, char* arg7 = NULL);
34 
35  // Check Output Request from child
36  int CheckOutput();
37 
38  int GetFd();
39 
40  // Check process status
41  pid_t CheckProcess();
42 
43  private:
44  int m_iopipe[2];
45  int m_fdout;
46  std::vector<pid_t> m_pidlist;
47 
48  };
50 }
51 
52 
53 
Belle2::RFProcessManager::Execute
int Execute(char *script, int nargs, char **args)
Definition: RFProcessManager.cc:55
Belle2::RFProcessManager
Definition: RFProcessManager.h:22
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19