# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= htop VERSION= 3.2.2 KEYWORDS= sysutils VARIANTS= standard SDESC[standard]= Interactive process viewer for Unix HOMEPAGE= https://hisham.hm/htop/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/htop-dev:htop:3.2.2 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none USES= autoreconf libtool ncurses pkgconfig execinfo bdb:5 python:build LICENSE= GPLv2:single LICENSE_TERMS= single:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo FPC_EQUIVALENT= sysutils/htop MUST_CONFIGURE= gnu CONFIGURE_ARGS= --enable-unicode post-extract: ${AWK} '/## License/ { x=1 } {if (x) print $$0;}' \ ${WRKSRC}/README > ${WRKDIR}/TERMS [FILE:825:descriptions/desc.single] htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form. Comparison between 'htop' and 'top' * In 'htop' you can scroll the list vertically and horizontally to see all processes and full command lines. * In 'top' you are subject to a delay for each unassigned key you press (especially when multi-key escape sequences are triggered by accident). * 'htop' starts faster ('top' seems to collect data for a while before displaying anything). * In 'htop' you don't need to type the process number to kill a process, in 'top' you do. * In 'htop' you don't need to type the process number or the priority value to renice a process, in 'top' you do. * In 'htop' you can kill multiple processes at once. * 'top' is older, hence, more tested. [FILE:105:distinfo] 3829c742a835a0426db41bb039d1b976420c21ec65e93b35cd9bfd2d57f44ac8 369873 htop-dev-htop-3.2.2.tar.gz [FILE:132:manifests/plist.single] bin/htop share/applications/htop.desktop share/icons/hicolor/scalable/apps/htop.svg share/man/man1/htop.1.gz share/pixmaps/htop.png [FILE:1185:patches/patch-dragonflybsd_DragonFlyBSDProcessList.c] --- dragonflybsd/DragonFlyBSDProcessList.c.orig 2022-06-03 00:54:39 UTC +++ dragonflybsd/DragonFlyBSDProcessList.c @@ -464,7 +464,7 @@ void ProcessList_goThroughEntries(Proces proc->pgrp = kproc->kp_pgid; // process group id proc->session = kproc->kp_sid; proc->st_uid = kproc->kp_uid; // user ID - proc->processor = kproc->kp_lwp.kl_origcpu; + proc->processor = kproc->kp_lwp.kl_cpuid; proc->starttime_ctime = kproc->kp_start.tv_sec; Process_fillStarttimeBuffer(proc); proc->user = UsersTable_getRef(super->usersTable, proc->st_uid); @@ -605,6 +605,24 @@ void ProcessList_goThroughEntries(Proces } } +char **DragonFlyBSDGet_env(pid_t pid) { + + kvm_t *kd; + struct kinfo_proc *kp; + char **env; + char errbuf[_POSIX2_LINE_MAX]; + int count; + + kd = kvm_openfiles(NULL, "/dev/null", NULL, 0, errbuf); + if (kd == NULL) + return NULL; + + kp = kvm_getprocs(kd, KERN_PROC_PID, pid, &count); + env = kvm_getenvv(kd, kp, 0); + kvm_close(kd); + return env; +} + bool ProcessList_isCPUonline(const ProcessList* super, unsigned int id) { assert(id < super->existingCPUs); [FILE:720:patches/patch-dragonflybsd_Platform.c] --- dragonflybsd/Platform.c.orig 2022-06-03 00:54:39 UTC +++ dragonflybsd/Platform.c @@ -223,9 +223,23 @@ void Platform_setSwapValues(Meter* this) } char* Platform_getProcessEnv(pid_t pid) { - // TODO - (void)pid; // prevent unused warning - return NULL; + char *env = NULL, **fenv = NULL, *ptr = NULL; + size_t size = 0; + + fenv = DragonFlyBSDGet_env(pid); + + if (fenv) { + ptr = fenv[0]; + while (ptr && *ptr) { + size += strlen(ptr) + 1; + ptr += strlen(ptr) + 1; + } + env = xMalloc(size+2); + memcpy(env, fenv[0], size); + env[size] = 0; + env[size+1] = 0; + } + return env; } char* Platform_getInodeFilename(pid_t pid, ino_t inode) {