Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 1996 19:57:23 +0000
From:      Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de>
To:        freebsd-current@freebsd.org
Subject:   invalid return value from sysctl_kern_proc ?
Message-ID:  <199610111957.TAA05925@peedub.gj.org>

next in thread | raw e-mail | index | archive | help
here's a fragment of code fom sysctl_kern_proc (/sys/kern/kern_proc.c)

	if (oidp->oid_number == KERN_PROC_PID) {
		if (namelen != 1) 
			return (EINVAL);
		p = pfind((pid_t)name[0]);
		if (!p)
			return (0);
				 ^^^^^^ shouldn't that be ESRCH ?

I ask because sysctl isn't returning an error when I try to get the proc
struct for a non-existent process. Seems to me that it should.

--------
Gary Jennejohn
Home - Gary.Jennejohn@munich.netsurf.de
Work - gjennejohn@frt.dec.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610111957.TAA05925>