git: KERN_PROC - Fix KERN_PROC_ARGS and KERN_PROC_CWD to return length if oldptr==NULL.
Imre Vadasz
ivadasz at crater.dragonflybsd.org
Sun Jan 11 11:18:23 PST 2026
commit b08bfb72c80a0e5e01f6cff85b9571f7ac2a33a1
Author: Imre Vadász <imre at vdsz.com>
Date: Sun Jan 11 18:58:56 2026 +0100
KERN_PROC - Fix KERN_PROC_ARGS and KERN_PROC_CWD to return length if oldptr==NULL.
Sysctl handlers still have to compute the full output, even when
oldptr == NULL. This is necessary to implement the behavior documented in
sysctl(3), that it will return the required buffer length in "oldlenp", if
"oldptr" is NULL and "oldlenp" is not NULL.
Summary of changes:
sys/kern/kern_proc.c | 92 +++++++++++++++++++++++++---------------------------
1 file changed, 45 insertions(+), 47 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b08bfb72c80a0e5e01f6cff85b9571f7ac2a33a1
--
DragonFly BSD source repository
More information about the Commits
mailing list