From nobody@FreeBSD.ORG  Sat Dec 25 20:43:21 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 4884614BFE; Sat, 25 Dec 1999 20:43:21 -0800 (PST)
Message-Id: <19991226044321.4884614BFE@hub.freebsd.org>
Date: Sat, 25 Dec 1999 20:43:21 -0800 (PST)
From: taka@cs.pitt.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: A minor bug in procfs code
X-Send-Pr-Version: www-1.0

>Number:         15696
>Category:       misc
>Synopsis:       A minor bug in procfs code
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 25 20:50:00 PST 1999
>Closed-Date:    Mon Dec 27 06:58:40 PST 1999
>Last-Modified:  Mon Dec 27 07:01:01 PST 1999
>Originator:     Takashi Okumura
>Release:        2.2.8, stable
>Organization:
University of Pittsburgh
>Environment:
%uname -a
FreeBSD hato.cs.pitt.edu 2.2.8-RELEASE FreeBSD 2.2.8-RELEASE #0: Sat Jul 10 20:01:12 EDT 1999     taka@hato.cs.pitt.edu:/rk98/compile/FreeBSD-2.2.8/new/compile/HATO  i386

>Description:
In the file,
ftp://ftp3.freebsd.org/pub/FreeBSD/FreeBSD-stable/src/sys/miscfs/procfs/procfs_status.c

procfs_dostatus(curp, p, pfs, uio)
...
        pid = p->p_pid;
        ppid = p->p_pptr ? p_p_pptr->p_pid : 0,
        pgid = p->p_pgrp->pg_id;

I believe the middle line should be:

        ppid = p->p_pptr ? p->p_pptr->p_pid : 0;

it seems like every procfs code has this bug since 1996....

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asmodai 
State-Changed-When: Mon Dec 27 06:58:40 PST 1999 
State-Changed-Why:  
The repository as well as the ftp URL in this PR both show that the in 
the PR mentioned `typo' never existed. 

The given `fix' for the middle line has been in the code since 1996, 
not the other way around. 
>Unformatted:
