'\" t
.\" Title: function::target
.\" Author:
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: November 2022
.\" Manual: Context Functions
.\" Source: SystemTap Tapset Reference
.\" Language: English
.\"
.TH "FUNCTION::TARGET" "3stap" "November 2022" "SystemTap Tapset Reference" "Context Functions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
function::target \- Return the process ID of the target process
.SH "SYNOPSIS"
.sp
.nf
target:long()
.fi
.SH "ARGUMENTS"
.PP
None
.SH "DESCRIPTION"
.PP
This function returns the process ID of the target process\&. This is useful in conjunction with the \-x PID or \-c CMD command\-line options to stap\&. An example of its use is to create scripts that filter on a specific process\&.
.PP
\-x
\fBtarget\fR
returns the pid specified by \-x
.PP
\-c
\fBtarget\fR
returns the pid for the executed command specified by \-c
.SH SEE ALSO\n
.IR tapset::context (3stap)