Don't treat the server already running as an error otherwise the Java code complains.

Emit a useful error if we couldn't get the PID.
This commit is contained in:
Daniel O'Connor 2012-06-25 14:14:33 +09:30
parent 8ad51554b4
commit 05d8ac5d05

View File

@ -689,11 +689,12 @@ app_server_start(int argc, const char *const *argv, struct command_line_option *
pid = server_pid(); pid = server_pid();
if (pid < 0) if (pid < 0)
return -1; return WHY("Failed to get server PID");
ret = 1; ret = 1;
if (pid > 0) { if (pid > 0) {
return WHYF("Serval process already running (pid=%d)", pid); WHYF("Serval process already running (pid=%d)", pid);
return 0;
} }
/* Start the Serval process. All server settings will be read by the server process from the /* Start the Serval process. All server settings will be read by the server process from the