# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= htop VERSION= 3.4.1 KEYWORDS= sysutils VARIANTS= std SDESC[std]= Interactive process viewer for Unix HOMEPAGE= https://hisham.hm/htop/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/htop-dev:htop:3.4.1 DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[std]= set primary man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none USES= autoreconf libtool ncurses pkgconfig execinfo bdb:5 python:build LICENSE= GPLv2:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo FPC_EQUIVALENT= sysutils/htop MUST_CONFIGURE= gnu CONFIGURE_ARGS= --enable-unicode VAR_OPSYS[midnightbsd]= MAKEFILE_LINE=CONFIGURE_TARGET=x86_64-raven-freebsd12.3 post-extract: ${AWK} '/## License/ { x=1 } {if (x) print $$0;}' \ ${WRKSRC}/README > ${WRKDIR}/TERMS [FILE:825:descriptions/desc.primary] 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] af9ec878f831b7c27d33e775c668ec79d569aa781861c995a0fbadc1bdb666cf 427538 htop-dev-htop-3.4.1.tar.gz [FILE:107:manifests/plist.primary] bin/htop share/applications/htop.desktop share/icons/hicolor/scalable/apps/htop.svg share/pixmaps/htop.png [FILE:22:manifests/plist.man] share/man/man1/htop.1 [FILE:989:patches/patch-dragonflybsd_Platform.c] --- dragonflybsd/Platform.c.orig 2025-04-11 02:00:29 UTC +++ dragonflybsd/Platform.c @@ -239,9 +239,33 @@ 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; + kvm_t *kd; + struct kinfo_proc *kp; + 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); + fenv = kvm_getenvv(kd, kp, 0); + kvm_close(kd); + + 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; } FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) {