Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

read(2)

fdopen(3)

XtAppAddInput(3Xt)

OpenWritePipe(3A)

OpenFilter(3A)

GetPipePid(3A)

ClosePipe(3A)

AddIoProc(3A)

RemoveIoProc(3A)



  OPENREADPIPE(3A)                                 OPENREADPIPE(3A)



  NAME
       OpenReadPipe, OpenReadPipeV - open a pipe for reading


  SYNOPSIS
       int OpenReadPipe (func, arg, cmd, arg ...)
       int (*func)();
       int arg;
       char *cmd;
       char *arg;

       int OpenReadPipeV (func, arg, cmd, argv)
       int (*func)();
       int arg;
       char *cmd;
       char **argv;

  DESCRIPTION
       OpenReadPipe opens a pipe for reading.  Cmd points to the
       full pathname of the command, and its arguments (starting
       with arg as argument zero) follow cmd in a NULL-terminated
       parameter list.  The file descriptor to read is in returned.
       -1 is returned on failure.

       OpenReadPipeV is like OpenReadPipe, except that it accepts a
       vector argv as an array of arguments.

       The file descriptor should be attached to an I/O procedure
       using AddIoProc(3A) for asynchronous operation.  For
       synchronous operation, it can be read using the read(2)
       system call, or it can be attached to a standard I/O file
       pointer using fdopen (3). When the pipe exits, func is
       called as follows:

            func (arg, pid, status)
            int arg;
            int pid;
            int status;

       The argument arg is the same as that passed to OpenReadPipe


  Page 1                                           (printed 9/3/91)


















  OPENREADPIPE(3A)                                 OPENREADPIPE(3A)



       or OpenReadPipeV.  The pid and status are the process ID and
       exit status of the command.

  SEE ALSO
       read(2), fdopen(3), XtAppAddInput(3Xt), OpenWritePipe(3A),
       OpenFilter(3A), GetPipePid(3A), ClosePipe(3A),
       AddIoProc(3A), RemoveIoProc(3A)



































  Page 2                                           (printed 9/3/91)
















Typewritten Software • bear@typewritten.org • Edmonds, WA 98026