home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / tcl_447.lzh / TCL / tcl.lzh / tcl / help / exec < prev    next >
Text File  |  1990-05-03  |  1KB  |  28 lines

  1.  exec command arg1 arg2 ...[< input]
  2.       The exec command treats its command argument as the
  3.       name of a program to execute.  It searches the
  4.       directories in the PATH environment variable to find an
  5.       executable file by the name command, then executes the
  6.       file, passing it an argument list consisting of command
  7.       plus all of the args.  If an argument < appears
  8.       anywhere among the arguments to exec, then neither it
  9.       or the following argument is passed to command.
  10.       Instead, the following argument (input) consists of
  11.       input to the command;  exec will create a pipe and use
  12.       it to pass input to command as standard input.  Exec
  13.       also creates a pipe to receive command's output (both
  14.       standard output and standard error).  The information
  15.       received over this pipe is returned as the result of
  16.       the exec command.  The exec command also looks at the
  17.       return status returned by command.  Normally this
  18.       should be zero; if it is then exec returns normally.
  19.       If command returns a non-zero status, then exec will
  20.       return that code;  it should be one of the ones defined
  21.       in the section ``COMMAND RESULTS'' above.  If an out-of
  22.       range code is returned by the command, it will cause
  23.       command unwinding just as if TCL_ERROR had been
  24.       returned; at the outermost level of command
  25.       interpretation, the Tcl interpreter will turn the code
  26.       into TCL_ERROR, with an appropriate error message.
  27.  
  28.