std::string _log_file;
std::string _base_command; // executable command which include libtool, valgrind, gdb, etc
std::string _running; // Current string being used for system()
+ pid_t _pid;
protected:
- pid_t _pid;
in_port_t _port;
std::string _hostname;
std::string _extra_args;
virtual bool ping()= 0;
- virtual pid_t get_pid(bool error_is_ok= true)= 0;
+ virtual pid_t get_pid(bool error_is_ok= false)= 0;
virtual bool build(int argc, const char *argv[])= 0;
return (_pid > 1);
}
+ bool check_pid(pid_t pid_arg) const
+ {
+ return (pid_arg > 1);
+ }
+
bool is_socket() const
{
return _hostname[0] == '/';
std::string log_and_pid();
- bool kill();
+ bool kill(pid_t pid_arg);
bool start();
bool command(std::string& command_arg);
void nap();
private:
+ bool is_helgrind() const;
bool is_valgrind() const;
bool is_debug() const;
bool set_log_file();
{
private:
std::string server_list;
+ bool _socket;
public:
std::vector<Server *> servers;
server_startup_st() :
+ _socket(false),
udp(0)
{ }
}
bool is_debug() const;
+ bool is_helgrind() const;
bool is_valgrind() const;
+ bool socket()
+ {
+ return _socket;
+ }
+
+ void set_socket()
+ {
+ _socket= true;
+ }
+
+
void shutdown(bool remove= false);
void push_server(Server *);
Server *pop_server();