SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue