Bug 698292

Summary: Option "-c" has undocumented side-effect of setting target()
Product: [Fedora] Fedora Reporter: Fabio Olive Leite <fleite>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 14CC: dsmith, fche, jistone, mjw, scox, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-20 20:04:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
baby patch to document stap(1) option -c better and unscramble function::target(3stap) none

Description Fabio Olive Leite 2011-04-20 15:21:14 UTC
Description of problem:

Using command line option "-c" to specify a command to run during the stap session has the undocumented side-effect of setting target() to the pid of the command ran. This is actually a good thing and should be documented. :)

Version-Release number of selected component (if applicable):

systemtap-1.4-2.fc14.x86_64, very likely F15 and rawhide as well.

How reproducible:

Always.

Steps to Reproduce:

$ sudo stap -e 'probe begin { printf("%d\n", target()); }
probe kernel.function("do_exit") {
  printf("%s(%d) called do_exit\n", execname(), pid());
}' -c /bin/true 

31688
true(31688) called do_exit

$ man stap
[find no mention of target() on "-c" section]

Actual results:

It is not documented on manpage and other documentation.

Expected results:

It should be documented on manpage and other documentation.

Additional info:

Maybe a bugzilla was not the best way to pursue this?

Comment 1 Frank Ch. Eigler 2011-04-20 15:27:29 UTC
It's documented in the function::target.3stap man page.

Comment 4 Fabio Olive Leite 2011-04-20 19:59:07 UTC
Created attachment 493611 [details]
baby patch to document stap(1) option -c better and unscramble function::target(3stap)

Comment 5 Frank Ch. Eigler 2011-04-20 20:04:25 UTC
Committed to upstream systemtap; should be fixed in version 1.5.