projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Minor cleanup in confirming socket close.
[awesomized/libmemcached]
/
libtest
/
server.h
diff --git
a/libtest/server.h
b/libtest/server.h
index 736810be0ae94b895ecf2523d479fa0bd54c1869..5b26fcddde2f1e10b9a005ee0917f63647650179 100644
(file)
--- a/
libtest/server.h
+++ b/
libtest/server.h
@@
-41,8
+41,10
@@
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <cstring>
+
#include <netdb.h>
#include <netinet/in.h>
#include <netdb.h>
#include <netinet/in.h>
+
#include <string>
#include <unistd.h>
#include <vector>
#include <string>
#include <unistd.h>
#include <vector>
@@
-204,8
+206,6
@@
public:
_log_file.clear();
}
_log_file.clear();
}
- bool args(Application&);
-
pid_t pid() const;
bool has_pid() const;
pid_t pid() const;
bool has_pid() const;
@@
-225,6
+225,11
@@
public:
_error= arg;
}
_error= arg;
}
+ void reset_error()
+ {
+ _error.clear();
+ }
+
virtual bool wait_for_pidfile() const;
bool check_pid(pid_t pid_arg) const
virtual bool wait_for_pidfile() const;
bool check_pid(pid_t pid_arg) const
@@
-234,7
+239,7
@@
public:
bool is_socket() const
{
bool is_socket() const
{
- return _
hostname[0] == '/'
;
+ return _
is_socket
;
}
const std::string running() const
}
const std::string running() const
@@
-246,12
+251,27
@@
public:
std::string log_and_pid();
std::string log_and_pid();
- bool
kill
();
+ bool
murder
();
bool start();
bool command(libtest::Application& app);
bool validate();
bool start();
bool command(libtest::Application& app);
bool validate();
+ void out_of_ban_killed(bool arg)
+ {
+ out_of_ban_killed_= arg;
+ }
+
+ bool out_of_ban_killed()
+ {
+ return out_of_ban_killed_;
+ }
+
+ void timeout(uint32_t timeout_)
+ {
+ _timeout= timeout_;
+ }
+
protected:
bool set_pid_file();
Options _options;
protected:
bool set_pid_file();
Options _options;
@@
-264,7
+284,11
@@
private:
bool set_log_file();
bool set_socket_file();
void reset_pid();
bool set_log_file();
bool set_socket_file();
void reset_pid();
+ bool out_of_ban_killed_;
+ bool args(Application&);
+
std::string _error;
std::string _error;
+ uint32_t _timeout; // This number should be high enough for valgrind startup (which is slow)
};
std::ostream& operator<<(std::ostream& output, const libtest::Server &arg);
};
std::ostream& operator<<(std::ostream& output, const libtest::Server &arg);