DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(guile.info.gz) Pipes

Info Catalog (guile.info.gz) Terminals and Ptys (guile.info.gz) POSIX (guile.info.gz) Networking
 
 38.10 Pipes
 ===========
 
 The following procedures provide an interface to the `popen' and
 `pclose' system routines.  The code is in a separate "popen" module:
 
      (use-modules (ice-9 popen))
 
  -- Scheme Procedure: open-pipe command modes
      Executes the shell command COMMAND (a string) in a subprocess.  A
      pipe to the process is created and returned.  MODES specifies
      whether an input or output pipe to the process is created: it
      should be the value of `OPEN_READ' or `OPEN_WRITE'.
 
  -- Scheme Procedure: open-input-pipe command
      Equivalent to `open-pipe' with mode `OPEN_READ'.
 
           (read-line (open-input-pipe "date"))
           => "Mon Mar 11 20:10:44 GMT 2002"
 
           (waitpid WAIT_ANY)
           => (24160 . 0)
 
  -- Scheme Procedure: open-output-pipe command
      Equivalent to `open-pipe' with mode `OPEN_WRITE'.
 
  -- Scheme Procedure: close-pipe port
      Closes the pipe created by `open-pipe', then waits for the process
      to terminate and returns its status value,  waitpid
      Processes, for information on how to interpret this value.
 
      `close-port' ( close-port Closing.) can also be used to
      close a pipe, but doesn't return the status.
 
Info Catalog (guile.info.gz) Terminals and Ptys (guile.info.gz) POSIX (guile.info.gz) Networking
automatically generated byinfo2html