summaryrefslogtreecommitdiffstats
path: root/bin/ps
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2014-08-28 08:41:11 +0000
committermjg <mjg@FreeBSD.org>2014-08-28 08:41:11 +0000
commitec92f2e61c40e5b3a519a14ea47a142d9047a75a (patch)
tree8b47cb5fe2bdf03c237daa6e7bf34f23a0e3a915 /bin/ps
parenta3bb3db4bfc2cbf2451d297879c706700876f778 (diff)
downloadFreeBSD-src-ec92f2e61c40e5b3a519a14ea47a142d9047a75a.zip
FreeBSD-src-ec92f2e61c40e5b3a519a14ea47a142d9047a75a.tar.gz
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
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/keyword.c1
-rw-r--r--bin/ps/ps.14
2 files changed, 4 insertions, 1 deletions
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
OpenPOWER on IntegriCloud