File: ServerControl.h

package info (click to toggle)
boxbackup 0.13~~git20221201.g166b3fa-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,172 kB
  • sloc: xml: 70,723; cpp: 55,456; ansic: 24,659; perl: 4,844; sh: 4,294; makefile: 588; python: 311
file content (28 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef SERVER_CONTROL_H
#define SERVER_CONTROL_H

#include "Test.h"

bool HUPServer(int pid);
bool KillServer(int pid, bool wait_for_process = false);
bool KillServer(const std::string& pid_file, bool wait_for_process = false);
bool KillServerInternal(int pid);
int StartDaemon(int current_pid, const std::string& cmd_line, const char* pid_file, int port = 0,
	const std::string& socket_path = "");
bool StopDaemon(int current_pid, const std::string& pid_file, const std::string& memleaks_file,
	bool wait_for_process);
int LaunchServer(const std::string& rCommandLine, const char *pidFile, int port = 0,
	const std::string& socket_path = "");
int WaitForServerStartup(const char *pidFile, int pidIfKnown, int port = 0,
	const std::string& socket_path = "");

#ifdef WIN32
	#include "WinNamedPipeStream.h"
	#include "IOStreamGetLine.h"
	#include "BoxPortsAndFiles.h"

	void SetNamedPipeName(const std::string& rPipeName);
	// bool SendCommands(const std::string& rCmd);
#endif // WIN32

#endif // SERVER_CONTROL_H