From c9990246da156a05de0918f7d9f3868d9e19b8cb Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 4 Sep 2004 18:56:27 +0000 Subject: [PATCH] PR: 9519 proc_dirname does not exist in solaris 10's libproc.so --- src/os/solaris/solaris_sigar.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index db960021..66b48f32 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -437,7 +437,7 @@ static int sigar_init_libproc(sigar_t *sigar) CHECK_PSYM(pgrab); CHECK_PSYM(pfree); CHECK_PSYM(pobjname); - CHECK_PSYM(pdirname); + /* CHECK_PSYM(pdirname); not in solaris 10 */ return SIGAR_OK; } @@ -818,7 +818,13 @@ int sigar_proc_exe_get(sigar_t *sigar, sigar_pid_t pid, if (procexe->name[0] == '\0') { /*XXX*/ } - + + if (!sigar->pdirname) { + /* XXX not in solaris 10 */ + procexe->cwd[0] = procexe->root[0] = '\0'; + return SIGAR_OK; + } + (void)SIGAR_PROC_FILENAME(buffer, pid, "/cwd"); if (!sigar->pdirname(buffer, procexe->cwd, sizeof(procexe->cwd))) {