X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fserver.cc;h=31c58094fa86e10bbbb3cc418491bb7c54783a4c;hb=1be0350e7ae7a566896a9fe52863dcc22433fc8a;hp=726a01ba61f015637ae3d0f082892f0348491db5;hpb=1c012a73c8d584d485924348388c0975cdd71831;p=m6w6%2Flibmemcached diff --git a/libtest/server.cc b/libtest/server.cc index 726a01ba..31c58094 100644 --- a/libtest/server.cc +++ b/libtest/server.cc @@ -164,7 +164,9 @@ 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 } // This needs more work. @@ -262,28 +264,29 @@ bool Server::start() if (kill_file(pid_file()) == false) { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, - "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %s stderr:%s", + "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %.*s stderr:%.*s", this_wait, - pid_file().c_str(), - _app.stderr_c_str()); + int(_running.size()), _running.c_str(), + int(_app.stderr_result_length()), _app.stderr_c_str()); } throw libtest::fatal(LIBYATL_DEFAULT_PARAM, - "Failed native ping(), pid: %d is alive: %s waited: %u server started, having pid_file. exec: %s stderr:%s", + "Failed native ping(), pid: %d is alive: %s waited: %u server started, having pid_file. exec: %.*s stderr:%.*s", int(_app.pid()), _app.check() ? "true" : "false", - this_wait, _running.c_str(), - _app.stderr_c_str()); + this_wait, + int(_running.size()), _running.c_str(), + int(_app.stderr_result_length()), _app.stderr_c_str()); } else { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, - "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %s stderr:%s", + "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %.*s stderr:%.*s", int(_app.pid()), _app.check() ? "true" : "false", this_wait, - _running.c_str(), - _app.stderr_c_str()); + int(_running.size()), _running.c_str(), + int(_app.stderr_result_length()), _app.stderr_c_str()); } _running.clear(); return false;