diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-03-29 18:10:46 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-03-29 18:10:46 +0000 |
| commit | 0316f71d563a101500719e908f1dd26711c43f27 (patch) | |
| tree | f20db602fa3d38f5b6c9db64190f70b7b7efb393 /sys/miscfs | |
| parent | 69f7c9a31ccfd67f0e49276463a7dcb22617654b (diff) | |
Notes
Diffstat (limited to 'sys/miscfs')
| -rw-r--r-- | sys/miscfs/procfs/procfs_ctl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/miscfs/procfs/procfs_ctl.c b/sys/miscfs/procfs/procfs_ctl.c index 6a20cc641bed..f0a54272345e 100644 --- a/sys/miscfs/procfs/procfs_ctl.c +++ b/sys/miscfs/procfs/procfs_ctl.c @@ -35,8 +35,6 @@ * SUCH DAMAGE. * * @(#)procfs_ctl.c 8.4 (Berkeley) 6/15/94 - * - * From: * $FreeBSD$ */ @@ -128,13 +126,12 @@ procfs_control(curp, p, op) if (op == PROCFS_CTL_ATTACH) { sx_xlock(&proctree_lock); PROC_LOCK(p); - /* check whether already being traced */ if (p->p_flag & P_TRACED) { error = EBUSY; goto out; } - /* can't trace yourself! */ + /* Can't trace yourself! */ if (p->p_pid == curp->p_pid) { error = EINVAL; goto out; @@ -156,10 +153,10 @@ procfs_control(curp, p, op) proc_reparent(p, curp); } psignal(p, SIGSTOP); - out: +out: PROC_UNLOCK(p); sx_xunlock(&proctree_lock); - return (0); + return (error); } /* @@ -266,7 +263,6 @@ procfs_control(curp, p, op) * to enter */ case PROCFS_CTL_WAIT: - error = 0; if (p->p_flag & P_TRACED) { mtx_lock_spin(&sched_lock); while (error == 0 && |
