|
rllib
1
|
00001 /*************************************************************************** 00002 rlspawn.h - description 00003 ------------------- 00004 begin : Wed Dec 11 2002 00005 copyright : (C) 2002 by Rainer Lehrig 00006 email : lehrig@t-online.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This library is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as * 00013 * published by the Free Software Foundation * 00014 * * 00015 ***************************************************************************/ 00016 #ifndef _RL_PCONTROL_H_ 00017 #define _RL_PCONTROL_H_ 00018 00019 #include "rltime.h" 00020 00024 class rlPcontrol 00025 { 00026 public: 00030 rlPcontrol(); 00031 00035 virtual ~rlPcontrol(); 00036 00040 void setStartupCommand(const char *command, const char *process_name); 00041 00045 int start(); 00046 00050 int sigterm(); 00051 00055 int sigkill(); 00056 00060 int isAlive(); 00061 00065 const char *startupCommand(); 00066 00070 const char *processName(); 00071 00075 rlTime *processTime(); 00076 00080 void setPID(long pid); 00081 00085 long pid(); 00086 00090 rlPcontrol *getNext(); 00091 00095 rlPcontrol *addNew(); 00096 #ifdef __VMS 00097 00100 void setInput (const char *input); 00101 00105 void setOutput(const char *output); 00106 00110 void setError (const char *error); 00111 #endif 00112 00116 void setPriority(int priority); 00117 00121 int priority(); 00122 00123 private: 00124 int rlstrlen(const char *str); 00125 char *startup_command, *process_name; 00126 00127 #ifdef __VMS 00128 char *m_input, *m_output, *m_error; 00129 #endif 00130 00131 #ifdef RLWIN32 00132 long m_dwProcessId; 00133 #endif 00134 00135 long m_pid; 00136 rlTime process_time; 00137 rlPcontrol *next; 00138 int prio; 00139 }; 00140 00141 #endif
1.7.5.1