From ec92f2e61c40e5b3a519a14ea47a142d9047a75a Mon Sep 17 00:00:00 2001 From: mjg Date: Thu, 28 Aug 2014 08:41:11 +0000 Subject: Return real parent pid in kinfo (used by e.g. ps) Add a separate field which exports tracer pid and add a new keyword ("tracer") for ps to display it. This is a follow up to r270444. Reviewed by: kib MFC after: 1 week Relnotes: yes --- bin/ps/keyword.c | 1 + bin/ps/ps.1 | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/ps') diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 3a0c323..38a9934 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -157,6 +157,7 @@ static VAR var[] = { {"tdnam", "TDNAM", NULL, LJUST, tdnam, 0, CHAR, NULL, 0}, {"time", "TIME", NULL, USER, cputime, 0, CHAR, NULL, 0}, {"tpgid", "TPGID", NULL, 0, kvar, KOFF(ki_tpgid), UINT, PIDFMT, 0}, + {"tracer", "TRACER", NULL, 0, kvar, KOFF(ki_tracer), UINT, PIDFMT, 0}, {"tsid", "TSID", NULL, 0, kvar, KOFF(ki_tsid), UINT, PIDFMT, 0}, {"tsiz", "TSIZ", NULL, 0, kvar, KOFF(ki_tsize), PGTOK, "ld", 0}, {"tt", "TT ", NULL, 0, tname, 0, CHAR, NULL, 0}, diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index d8e56fb..294ecf9 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 7, 2014 +.Dd August 27, 2014 .Dt PS 1 .Os .Sh NAME @@ -665,6 +665,8 @@ accumulated CPU time, user + system (alias .Cm cputime ) .It Cm tpgid control terminal process group ID +.It Cm tracer +tracer process ID .\".It Cm trss .\"text resident set size (in Kbytes) .It Cm tsid -- cgit v1.1