diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-07-31 06:39:54 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-07-31 06:39:54 +0000 |
commit | 762af2a462607258817fde3dc919ee7db5d1bcf0 (patch) | |
tree | 5871cf32b97f6ce61b51804e620dfe3990003889 /lib/server/ServerControl.h | |
parent | 74519c6abfeada675dfa0e4d035e45d58f0d9903 (diff) |
Refactor to allow sharing code for starting and stopping daemons in tests.
The new StartDaemon() and StopDaemon() in ServerControl.cpp/h are generic,
and used by StartClient() and StartServer() in StoreTestUtils.cpp/h.
Diffstat (limited to 'lib/server/ServerControl.h')
-rw-r--r-- | lib/server/ServerControl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/server/ServerControl.h b/lib/server/ServerControl.h index b2e51864..430f03a3 100644 --- a/lib/server/ServerControl.h +++ b/lib/server/ServerControl.h @@ -5,6 +5,9 @@ bool HUPServer(int pid); bool KillServer(int pid, bool WaitForProcess = false); +int StartDaemon(int current_pid, const std::string& cmd_line, const char* pid_file); +bool StopDaemon(int current_pid, const std::string& pid_file, + const std::string& memleaks_file, bool wait_for_process); #ifdef WIN32 #include "WinNamedPipeStream.h" |