Server::~Server()
{
- murder();
+ kill();
}
bool Server::check()
{
_app.slurp();
- _app.check();
- return true;
+ return _app.check();
}
bool Server::validate()
while (--limit and
is_pid_valid(_app.pid()))
{
- if (murder())
+ if (kill())
{
Log << "Killed existing server," << *this;
dream(0, 50000);
return wait.successful();
}
+bool Server::init(const char *argv[])
+{
+ if (argv)
+ {
+ for (const char **ptr= argv; *ptr ; ++ptr)
+ {
+ if (ptr)
+ {
+ add_option(*ptr);
+ }
+ }
+ }
+
+ return build();
+}
+
bool Server::has_pid() const
{
return (_app.pid() > 1);
bool Server::start()
{
- // If we find that we already have a pid then kill it.
- if (has_pid() == true)
- {
-#if 0
- fatal_message("has_pid() failed, programer error");
-#endif
- }
-
if (getenv("YATL_GDB_SERVER"))
{
_app.use_gdb(true);
return true;
}
-bool Server::murder()
+bool Server::kill()
{
if (check_pid(_app.pid())) // If we kill it, reset
{