PR: 9519
proc_dirname does not exist in solaris 10's libproc.so
This commit is contained in:
parent
2e940caf97
commit
c9990246da
|
@ -437,7 +437,7 @@ static int sigar_init_libproc(sigar_t *sigar)
|
||||||
CHECK_PSYM(pgrab);
|
CHECK_PSYM(pgrab);
|
||||||
CHECK_PSYM(pfree);
|
CHECK_PSYM(pfree);
|
||||||
CHECK_PSYM(pobjname);
|
CHECK_PSYM(pobjname);
|
||||||
CHECK_PSYM(pdirname);
|
/* CHECK_PSYM(pdirname); not in solaris 10 */
|
||||||
|
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
@ -819,6 +819,12 @@ int sigar_proc_exe_get(sigar_t *sigar, sigar_pid_t pid,
|
||||||
/*XXX*/
|
/*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");
|
(void)SIGAR_PROC_FILENAME(buffer, pid, "/cwd");
|
||||||
|
|
||||||
if (!sigar->pdirname(buffer, procexe->cwd, sizeof(procexe->cwd))) {
|
if (!sigar->pdirname(buffer, procexe->cwd, sizeof(procexe->cwd))) {
|
||||||
|
|
Loading…
Reference in New Issue