procfs - Try to workaround issue to fix truss
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 19 Jun 2016 23:56:03 +0000 (16:56 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 19 Jun 2016 23:56:03 +0000 (16:56 -0700)
* If PIOCWAIT is called and no process stops are present, silently return
  0 rather then EINVAL.

* Appears to fix the truss issue.

Reported-by: tkusumi
sys/vfs/procfs/procfs_vnops.c

index 78c717f..0ba6786 100644 (file)
@@ -359,7 +359,7 @@ procfs_ioctl(struct vop_ioctl_args *ap)
            tsleep_interlock(&procp->p_stype, PCATCH);
            spin_unlock(&procp->p_spin);
            if (procp->p_stops == 0) {
-               error = EINVAL;
+               error = 0;
                goto done;
            }
            if (procp->p_flags & P_POSTEXIT) {