CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2024/08/08 09:02:36

Modified files:
        sys/kern       : kern_sysctl.c 

Log message:
In sysctl KERN_FILE_BYPID stop traversal after pid has been found.

When searching for a specific process, there is no need to traverse
the list of all processes to the end.  Break after pid has been
found and the file structure has been filled.  Also check for arg
>= 0 as this is consistent with the arg < -1 check before.  This
makes no functional difference as process 0 has PS_SYSTEM set and
is skipped anyway.

OK millert@ mvs@

Reply via email to