version 1.1, 2005/03/03 03:01:26
|
version 1.2, 2005/03/05 16:45:15
|
|
|
// | // |
///////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////// |
| |
int aixcimsrvrunning(pid_t pid) |
int aixcimsrvrunning(pid_t pid, const char* processName) |
{ | { |
int i,count; | int i,count; |
struct procsinfo *proctable; | struct procsinfo *proctable; |
|
|
if (proctable==NULL) | if (proctable==NULL) |
return -1; | return -1; |
for (i=0;i<count;i++) | for (i=0;i<count;i++) |
if (!strcmp(proctable[i].pi_comm,getProcessName()) && \ |
if (!strcmp(proctable[i].pi_comm, processName) && \ |
proctable[i].pi_pid==pid) | proctable[i].pi_pid==pid) |
{ | { |
free(proctable); | free(proctable); |
|
|
return isProcRunning(pid); | return isProcRunning(pid); |
#endif | #endif |
#if defined(PEGASUS_OS_AIX) | #if defined(PEGASUS_OS_AIX) |
if (aixcimsrvrunning(pid)!=-1) |
if (aixcimsrvrunning(pid, getProcessName())!=-1) |
return true; | return true; |
#endif | #endif |
return false; | return false; |
|
|
} | } |
#endif | #endif |
#if defined(PEGASUS_OS_AIX) | #if defined(PEGASUS_OS_AIX) |
if (!aixcimsrvrunning(pid)) |
if (!aixcimsrvrunning(pid, getProcessName())) |
kill(pid,SIGKILL); | kill(pid,SIGKILL); |
#endif | #endif |
// remove the file | // remove the file |