mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Use PROCDIR throughout instead of /proc on Linux
This commit is contained in:

committed by
cgzones

parent
1efddaf1e5
commit
37921382f4
@ -230,8 +230,8 @@ void Platform_setZfsCompressedArcValues(Meter* this) {
|
||||
ZfsCompressedArcMeter_readStats(this, &(lpl->zfs));
|
||||
}
|
||||
char* Platform_getProcessEnv(pid_t pid) {
|
||||
char procname[32+1];
|
||||
xSnprintf(procname, 32, "/proc/%d/environ", pid);
|
||||
char procname[128];
|
||||
xSnprintf(procname, sizeof(procname), PROCDIR "/%d/environ", pid);
|
||||
FILE* fd = fopen(procname, "r");
|
||||
char *env = NULL;
|
||||
if (fd) {
|
||||
|
Reference in New Issue
Block a user