Belle II Software development
RFProcessManager.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <stdio.h>
11#include <sys/types.h>
12
13#include <vector>
14
15
16namespace 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 std::vector<pid_t> m_pidlist;
46
47 };
49}
50
51
52
int Execute(char *script, int nargs, char **args)
Abstract base class for different kinds of events.