version 1.11.18.3, 2007/12/10 21:21:02
|
version 1.12, 2007/02/15 16:42:26
|
|
|
#endif | #endif |
#define MAX_WAIT_TIME 240 | #define MAX_WAIT_TIME 240 |
#if defined(PEGASUS_OS_AIX) | #if defined(PEGASUS_OS_AIX) |
#include <procinfo.h> |
|
#define PROCSIZE sizeof(struct procsinfo) |
|
#if PEGASUS_AIX_VERSION <= 5 |
|
// AIX version 5 does not define getprocs() in procinfo.h |
|
extern "C" { | extern "C" { |
|
#include <procinfo.h> |
extern int getprocs(struct procsinfo *, int, struct fdsinfo *, int,pid_t *,int); | extern int getprocs(struct procsinfo *, int, struct fdsinfo *, int,pid_t *,int); |
|
#define PROCSIZE sizeof(struct procsinfo) |
} | } |
#endif | #endif |
#endif |
|
| |
PEGASUS_USING_PEGASUS; | PEGASUS_USING_PEGASUS; |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
|
|
} | } |
if( !handleSigUsr1 ) | if( !handleSigUsr1 ) |
{ | { |
//NOCHKSRC |
|
MessageLoaderParms parms("src.Service.ServerProcessUnix.CIMSERVER_START_TIMEOUT", | MessageLoaderParms parms("src.Service.ServerProcessUnix.CIMSERVER_START_TIMEOUT", |
"The cimserver command timed out waiting for the CIM server to start."); | "The cimserver command timed out waiting for the CIM server to start."); |
PEGASUS_STD(cerr) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << MessageLoader::getMessage(parms) << PEGASUS_STD(endl); |
//DOCHKSRC |
|
} | } |
exit(graveError); | exit(graveError); |
} | } |
|
|
buf.ps_pathptr =(char *) malloc(buf.ps_pathlen =PS_PATHBLEN); | buf.ps_pathptr =(char *) malloc(buf.ps_pathlen =PS_PATHBLEN); |
buf.ps_cmdptr =(char *) malloc(buf.ps_cmdlen =PS_CMDBLEN); | buf.ps_cmdptr =(char *) malloc(buf.ps_cmdlen =PS_CMDBLEN); |
| |
while((token = w_getpsent(token, &buf, sizeof(buf))) > 0) |
token = w_getpsent(token, &buf, sizeof(buf)); |
{ |
do { |
if (buf.ps_pid==pid) |
token = w_getpsent(token, &buf, sizeof(buf)); |
{ |
if (buf.ps_pid==pid) { |
// If the process id is associated with the program |
|
// "cimserver", then a cimserver is still running. |
|
if (strstr(buf.ps_pathptr,"cimserver")!= NULL ) |
|
{ |
|
free(buf.ps_conttyptr); | free(buf.ps_conttyptr); |
free(buf.ps_pathptr); | free(buf.ps_pathptr); |
free(buf.ps_cmdptr); | free(buf.ps_cmdptr); |
return true; | return true; |
} | } |
// pid found was not associated with a cimserver |
} while(token>0); |
break; |
|
} |
|
} |
|
| |
free(buf.ps_conttyptr); | free(buf.ps_conttyptr); |
free(buf.ps_pathptr); | free(buf.ps_pathptr); |