Index: sys/kern/sys_procdesc.c =================================================================== --- sys/kern/sys_procdesc.c +++ sys/kern/sys_procdesc.c @@ -191,7 +191,7 @@ int error; error = fget(td, fd, rightsp, &fp); - if (error) + if (error != 0) return (error); if (fp->f_type != DTYPE_PROCDESC) { error = EBADF;