summaryrefslogtreecommitdiffstats
path: root/doc/exec.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/exec.n')
-rw-r--r--doc/exec.n61
1 files changed, 21 insertions, 40 deletions
diff --git a/doc/exec.n b/doc/exec.n
index 619f1e9..01f7004 100644
--- a/doc/exec.n
+++ b/doc/exec.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: exec.n,v 1.18 2007/10/25 14:07:32 dkf Exp $
+'\" RCS: @(#) $Id: exec.n,v 1.19 2007/10/26 20:11:52 dgp Exp $
'\"
.so man.macros
.TH exec n 8.5 Tcl "Tcl Built-In Commands"
@@ -49,12 +49,9 @@ If an \fIarg\fR (or pair of \fIarg\fRs) has one of the forms
described below then it is used by \fBexec\fR to control the
flow of input and output among the subprocess(es).
Such arguments will not be passed to the subprocess(es). In forms
-such as
-.QW "< \fIfileName\fR" ,
-\fIfileName\fR may either be in a separate argument from
-.QW <
-or in the same argument with no intervening space (i.e.
-.QW <\fIfileName\fR ).
+such as ``< \fIfileName\fR'' \fIfileName\fR may either be in a
+separate argument from ``<'' or in the same argument with no
+intervening space (i.e. ``<\fIfileName\fR'').
.TP 15
|
Separates distinct commands in the pipeline. The standard output
@@ -137,9 +134,8 @@ If standard output has not been redirected then the \fBexec\fR
command returns the standard output from the last command
in the pipeline,
.VS 8.5
-unless
-.QW 2>@1
-was specified, in which case standard error is included as well.
+unless ``2>@1'' was specified, in which case
+standard error is included as well.
.VE 8.5
If any of the commands in the pipeline exit abnormally or
are killed or suspended, then \fBexec\fR will return an error
@@ -165,17 +161,12 @@ normally end with newlines.
However, if \fB\-keepnewline\fR is specified then the trailing
newline is retained.
.PP
-If standard input isn't redirected with
-.QW < ,
-.QW <<
-or
-.QW <@
-then the standard input for the first command in the
+If standard input isn't redirected with ``<'' or ``<<''
+or ``<@'' then the standard input for the first command in the
pipeline is taken from the application's current standard input.
.PP
-If the last \fIarg\fR is
-.QW &
-then the pipeline will be executed in background.
+If the last \fIarg\fR is ``&'' then the pipeline will be
+executed in background.
In this case the \fBexec\fR command will return a list whose
elements are the process identifiers for all of the subprocesses
in the pipeline.
@@ -191,16 +182,14 @@ no slashes then the directories
in the PATH environment variable are searched for
an executable by the given name.
If the name contains a slash then it must refer to an executable
-reachable from the current directory. No
-.QW glob
-expansion or other shell-like substitutions
+reachable from the current directory.
+No ``glob'' expansion or other shell-like substitutions
are performed on the arguments to commands.
.SH "PORTABILITY ISSUES"
.TP
\fBWindows\fR (all versions)
.
-Reading from or writing to a socket, using the
-.QW \fB@\0\fIfileId\fR
+Reading from or writing to a socket, using the ``\fB@\0\fIfileId\fR''
notation, does not work. When reading from a socket, a 16-bit DOS
application will hang and a 32-bit application will return immediately with
end-of-file. When either type of application writes to a socket, the
@@ -225,11 +214,8 @@ path separator, it may or may not be recognized as a path name, depending on
the program.
.PP
Additionally, when calling a 16-bit DOS or Windows 3.X application, all path
-names must use the short, cryptic, path format (e.g., using
-.QW applba~1.def
-instead of
-.QW applbakery.default ),
-which can be obtained with the
+names must use the short, cryptic, path format (e.g., using ``applba~1.def''
+instead of ``applbakery.default''), which can be obtained with the
\fBfile attributes $fileName -shortname\fR command.
.PP
Two or more forward or backward slashes in a row in a path refer to a
@@ -288,8 +274,7 @@ The Windows NT home directory.
The directories listed in the path.
.PP
In order to execute shell built-in commands like \fBdir\fR and \fBcopy\fR,
-the caller must prepend the desired command with
-.QW "\fBcmd.exe /c\0\fR"
+the caller must prepend the desired command with ``\fBcmd.exe /c\0\fR''
because built-in commands are not implemented using executables.
.RE
.TP
@@ -314,8 +299,7 @@ The Windows 9x home directory.
The directories listed in the path.
.PP
In order to execute shell built-in commands like \fBdir\fR and \fBcopy\fR,
-the caller must prepend the desired command with
-.QW "\fBcommand.com /c\0\fR"
+the caller must prepend the desired command with ``\fBcommand.com /c\0\fR''
because built-in commands are not implemented using executables.
.PP
Once a 16-bit DOS application has read standard input from a console and
@@ -327,9 +311,7 @@ at this time.
.PP
Redirection between the \fBNUL:\fR device and a 16-bit application does not
always work. When redirecting from \fBNUL:\fR, some applications may hang,
-others will get an infinite stream of
-.QW 0x01
-bytes, and some will actually
+others will get an infinite stream of ``0x01'' bytes, and some will actually
correctly get an immediate end-of-file; the behavior seems to depend upon
something compiled into the application itself. When redirecting greater than
4K or so to \fBNUL:\fR, some applications will hang. The above problems do not
@@ -428,10 +410,9 @@ differences in behaviour between \fBexec\fR and DOS batch files.
.PP
When in doubt, use the command \fBauto_execok\fR: it will return the
complete path to the program as seen by the \fBexec\fR command. This
-applies especially when you want to run
-.QW "internal"
-commands like \fIdir\fR from a Tcl script (if you just want to list
-filenames, use the \fBglob\fR command.) To do that, use this:
+applies especially when you want to run "internal" commands like
+\fIdir\fR from a Tcl script (if you just want to list filenames, use
+the \fBglob\fR command.) To do that, use this:
.CS
\fBexec\fR {*}[auto_execok dir] *.tcl
.CE