git: DragonFly_RELEASE_6_4 KERN_PROC - Fix KERN_PROC_ARGS and KERN_PROC_CWD to return length if oldptr==NULL.
Aaron LI
aly at crater.dragonflybsd.org
Mon Feb 2 05:16:09 PST 2026
commit da6ab613212930cc7882ee107e8c9916e9a24d4b
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/da6ab613212930cc7882ee107e8c9916e9a24d4b
--
DragonFly BSD source repository
More information about the Commits
mailing list