Date: Fri, 15 Jun 2018 13:56:58 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335199 - head/sys/compat/linprocfs Message-ID: <201806151356.w5FDuwq9033680@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <yanko.yankulov@gmail.com> 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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806151356.w5FDuwq9033680>