now that they're available, include userland thread names in htop's display
(either in COMM or in "Command (merged)" if set to show thread names)
This commit is contained in:
parent
d23b038578
commit
9dad6978bd
@ -1,6 +1,7 @@
|
||||
COMMENT = interactive process viewer
|
||||
|
||||
V = 3.2.1
|
||||
REVISION = 0
|
||||
DISTNAME = htop-$V
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
20
sysutils/htop/patches/patch-openbsd_OpenBSDProcessList_c
Normal file
20
sysutils/htop/patches/patch-openbsd_OpenBSDProcessList_c
Normal file
@ -0,0 +1,20 @@
|
||||
Include thread names in COMM
|
||||
|
||||
Index: openbsd/OpenBSDProcessList.c
|
||||
--- openbsd/OpenBSDProcessList.c.orig
|
||||
+++ openbsd/OpenBSDProcessList.c
|
||||
@@ -211,7 +211,13 @@ static void OpenBSDProcessList_updateCwd(const struct
|
||||
}
|
||||
|
||||
static void OpenBSDProcessList_updateProcessName(kvm_t* kd, const struct kinfo_proc* kproc, Process* proc) {
|
||||
- Process_updateComm(proc, kproc->p_comm);
|
||||
+ char buf[50]; /* procname/threadname (each MAXCOMLEN) + NUL */
|
||||
+ if (kproc->p_name[0] != '\0') {
|
||||
+ snprintf(buf, sizeof buf, "%s/%s", kproc->p_comm, kproc->p_name);
|
||||
+ Process_updateComm(proc, buf);
|
||||
+ } else {
|
||||
+ Process_updateComm(proc, kproc->p_comm);
|
||||
+ }
|
||||
|
||||
/*
|
||||
* Like OpenBSD's top(1), we try to fall back to the command name
|
Loading…
x
Reference in New Issue
Block a user