From owner-svn-src-head@freebsd.org Fri Jun 15 13:56:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B0801007675; Fri, 15 Jun 2018 13:56:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 325CA6EC66; Fri, 15 Jun 2018 13:56:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 133D41840B; Fri, 15 Jun 2018 13:56:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5FDuwli033681; Fri, 15 Jun 2018 13:56:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5FDuwq9033680; Fri, 15 Jun 2018 13:56:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806151356.w5FDuwq9033680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 Jun 2018 13:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335199 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 335199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2018 13:56:59 -0000 Author: kib Date: Fri Jun 15 13:56:58 2018 New Revision: 335199 URL: https://svnweb.freebsd.org/changeset/base/335199 Log: linprocfs: add TracerPid to /proc/pid/status. Also fix the value of parent pid if the process is traced. Submitted by: Yanko Yankulov MFC after: 1 week Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Fri Jun 15 13:53:37 2018 (r335198) +++ head/sys/compat/linprocfs/linprocfs.c Fri Jun 15 13:56:58 2018 (r335199) @@ -829,8 +829,8 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) * Credentials */ sbuf_printf(sb, "Pid:\t%d\n", p->p_pid); - sbuf_printf(sb, "PPid:\t%d\n", p->p_pptr ? - p->p_pptr->p_pid : 0); + sbuf_printf(sb, "PPid:\t%d\n", kp.ki_ppid ); + sbuf_printf(sb, "TracerPid:\t%d\n", kp.ki_tracer ); sbuf_printf(sb, "Uid:\t%d %d %d %d\n", p->p_ucred->cr_ruid, p->p_ucred->cr_uid, p->p_ucred->cr_svuid,