|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_RUN_IMPL_RUNPROCMANAGER_H
11 #define YARP_RUN_IMPL_RUNPROCMANAGER_H
14 # if !defined(WIN32_LEAN_AND_MEAN)
15 # define WIN32_LEAN_AND_MEAN
19 # include <sys/types.h>
45 int SIGNAL(
int pid,
int signum);
52 int warn_suppress = yarp::run::impl::pipe(
pipe_sync);
80 PID zombie = yarp::os::impl::wait(
nullptr);
90 yarp::run::Run::CleanZombie(zombie);
113 #define YARPRUN_ERROR -1
138 virtual bool Signal(
int signum);
140 virtual bool Clean();
173 int Signal(std::string& alias,
int signum);
178 void GetHandles(
HANDLE* &lpHandles, DWORD &nCount);
205 FDESC readFromPipeCmdToStdout,
206 FDESC writeToPipeCmdToStdout,
214 std::string& stdioUUID,
218 FDESC readFromPipeStdinToCmd,
219 FDESC writeToPipeStdinToCmd,
220 FDESC readFromPipeCmdToStdout,
221 FDESC writeToPipeCmdToStdout,
227 bool Clean()
override;
315 sprintf(buff,
"%d", x);
316 return std::string(buff);
319 #endif // YARP_RUN_IMPL_RUNPROCMANAGER_H
A simple collection of objects that can be described and transmitted in a portable way.
YarpRunProcInfo * m_apList[MAX_PROCESSES]
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
std::string int2String(int x)
int Signal(std::string &alias, int signum)
bool Match(std::string &alias)
bool CleanZombie(int zombie)
void onStop() override
Call-back, called while halting the thread (before join).
FDESC mWriteToPipeStdinToCmd
bool Add(YarpRunProcInfo *process)
FDESC mReadFromPipeStdinToCmd
An abstraction for a thread of execution.
YarpRunProcInfo(std::string &alias, std::string &on, PID pidCmd, HANDLE handleCmd, bool hold)
virtual ~YarpRunCmdWithStdioInfo()
void run() override
Main body of the new thread.
bool Clean(PID pid, YarpRunProcInfo *&pRef) override
virtual bool Clean(PID pid, YarpRunProcInfo *&pRef)
virtual ~ZombieHunterThread()
int SIGNAL(int pid, int signum)
void setEnv(const std::string &env)
FDESC mReadFromPipeCmdToStdout
YarpRunInfoVector * mStdioVector
YarpRunCmdWithStdioInfo(std::string &alias, std::string &on, std::string &stdio, PID pidCmd, PID pidStdout, FDESC readFromPipeCmdToStdout, FDESC writeToPipeCmdToStdout, HANDLE handleCmd, bool hold)
void setCmd(const std::string &cmd)
virtual bool Signal(int signum)
bool isStopping()
Returns true if the thread is stopping (Thread::stop has been called).
virtual ~YarpRunProcInfo()
static const int MAX_PROCESSES
FDESC mWriteToPipeCmdToStdout
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
bool IsRunning(std::string &alias)
YarpRunInfoVector * m_pStdioMate