docs/128222: [patch] man page truss(1) claims that init(8) can be traced

Mateusz Guzik mjguzik at gmail.com
Sun Oct 19 14:00:10 UTC 2008


>Number:         128222
>Category:       docs
>Synopsis:       [patch] man page truss(1) claims that init(8) can be traced
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 19 14:00:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Mateusz Guzik
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #14: Mon Sep 15 17:38:51 CEST 2008     f at eternal:/usr/obj/usr/src/sys/ETERNAL  i386

>Description:
In truss(1) one can find the following:
# Follow an already-running process
           $ truss -p 1

but:
# truss -p 1
truss: can not attach to target process: Invalid argument

(It fails because init(8) is marked as a system process and ptrace doesn't allow to trace these.)

>How-To-Repeat:
Run `trace -p 1`
>Fix:
Change pid 1 to for example 34, as in the man page for ktrace(1).

Patch attached with submission follows:

--- usr.bin/truss/truss.1.orig	2008-10-19 14:47:33.000000000 +0200
+++ usr.bin/truss/truss.1	2008-10-19 15:41:01.000000000 +0200
@@ -85,7 +85,7 @@
 # Do the same, but put the output into a file
 .Dl $ truss -o /tmp/truss.out /bin/echo hello
 # Follow an already-running process
-.Dl $ truss -p 1
+.Dl $ truss -p 34
 .Sh SEE ALSO
 .Xr kdump 1 ,
 .Xr ktrace 1 ,


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list