diff options
author | dkf <dkf@noemail.net> | 2004-10-27 14:23:38 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-10-27 14:23:38 (GMT) |
commit | 283036b2fce11f6302bae2d3b3b2f00217546af9 (patch) | |
tree | f7746a2a8316d612570e1456524e3d182e855c82 /doc/pid.n | |
parent | 46669897decc1c69eb2226d713c9ddaa026431ec (diff) | |
download | tcl-283036b2fce11f6302bae2d3b3b2f00217546af9.zip tcl-283036b2fce11f6302bae2d3b3b2f00217546af9.tar.gz tcl-283036b2fce11f6302bae2d3b3b2f00217546af9.tar.bz2 |
Yet more doc update backporting
FossilOrigin-Name: 437d4766e451250d467d2b0c470b7c21a7ac2e2c
Diffstat (limited to 'doc/pid.n')
-rw-r--r-- | doc/pid.n | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -5,14 +5,14 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: pid.n,v 1.3 2000/09/07 14:27:50 poenitz Exp $ +'\" RCS: @(#) $Id: pid.n,v 1.3.18.1 2004/10/27 14:23:57 dkf Exp $ '\" .so man.macros .TH pid n 7.0 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -pid \- Retrieve process id(s) +pid \- Retrieve process identifiers .SH SYNOPSIS \fBpid \fR?\fIfileId\fR? .BE @@ -29,6 +29,19 @@ that isn't a process pipeline. If no \fIfileId\fR argument is given then \fBpid\fR returns the process identifier of the current process. All process identifiers are returned as decimal strings. +.SH EXAMPLE +Print process information about the processes in a pipeline using the +SysV \fBps\fR program before reading the output of that pipeline: +.PP +.CS +set pipeline [open "| zcat somefile.gz | grep foobar | sort -u"] +# Print process information +exec ps -fp [\fBpid\fR $pipeline] >@stdout +# Print a separator and then the output of the pipeline +puts [string repeat - 70] +puts [read $pipeline] +close $pipeline +.CE .SH "SEE ALSO" exec(n), open(n) |