version 1.4, 2007/06/05 10:23:56
|
version 1.5, 2007/06/22 17:35:53
|
|
|
const char* pidFilePath) | const char* pidFilePath) |
: _serverName(serverName), | : _serverName(serverName), |
_pidFilePath(pidFilePath), | _pidFilePath(pidFilePath), |
|
_isRunningServerInstance(false), |
_parentPid(0), | _parentPid(0), |
_event(NULL), | _event(NULL), |
_wasAlreadyRunning(false) | _wasAlreadyRunning(false) |
|
|
const char* pidFilePath) | const char* pidFilePath) |
: _serverName(serverName), | : _serverName(serverName), |
_pidFilePath(pidFilePath), | _pidFilePath(pidFilePath), |
|
_isRunningServerInstance(false), |
_parentPid(0) | _parentPid(0) |
{ | { |
} | } |
| |
ServerRunStatus::~ServerRunStatus() | ServerRunStatus::~ServerRunStatus() |
{ | { |
|
if (_isRunningServerInstance) |
|
{ |
|
PidFile pidFile(_pidFilePath); |
|
pidFile.remove(); |
|
} |
} | } |
| |
Boolean ServerRunStatus::isServerRunning() | Boolean ServerRunStatus::isServerRunning() |
|
|
{ | { |
PidFile pidFile(_pidFilePath); | PidFile pidFile(_pidFilePath); |
pidFile.setPid(System::getPID()); | pidFile.setPid(System::getPID()); |
|
_isRunningServerInstance = true; |
} | } |
| |
void ServerRunStatus::setParentPid(PEGASUS_PID_T parentPid) | void ServerRunStatus::setParentPid(PEGASUS_PID_T parentPid) |