On Sat, Jan 16, 2021 at 08:38:44AM +0000, Mateusz Guzik wrote:
> diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
> index 269705205fbc..ae80ba9ed5ed 100644
> --- a/sys/kern/kern_proc.c
> +++ b/sys/kern/kern_proc.c
> @@ -2088,12 +2088,16 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS)
>       if (namelen != 1)
>               return (EINVAL);
>  
> +     p = curproc;
>       pid = (pid_t)name[0];
> +     if (pid == -1) {
> +             pid = p->p_pid;
> +     }
If ever done, this should be done in pget(), to provide consistent interface
for all kern.proc nodes.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to