Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

read(2)

write(2)

fdopen(3)

XtAppAddInput(3Xt)

OpenReadPipe(3A)

OpenFilter(3A)

GetPipePid(3A)

ClosePipe(3A)

AddIoProc(3A)

RemoveIoProc(3A)



  OPENFILTER(3A)                                     OPENFILTER(3A)



  NAME
       OpenFilter, OpenFilterV - open a pipe for writing


  SYNOPSIS
       int OpenWritePipe (rfd, wfd, func, arg, cmd, arg ...)
       int *rfd;
       int *wfd;
       int (*func)();
       int arg;
       char *cmd;
       char *arg;

       int OpenWritePipeV (rfd, wfd, func, arg, cmd, argv)
       int *rfd;
       int *wfd;
       int (*func)();
       int arg;
       char *cmd;
       char **argv;

  DESCRIPTION
       OpenFilter opens two pipes connected to a command for
       filtering data.  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 from which to write is in returned in rfd.
       The file descriptor to which to write is in returned in wfd.
       -1 is returned on failure, zero on success.

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

       The file descriptors should be attached to I/O procedures
       using AddIoProc(3A) for asynchronous operation.  For
       synchronous operation, the pipes can be read from and
       written to using the read(2) and write(2) system calls, or
       they can be attached to standard I/O file pointers using
       fdopen (3). When the command exits, func is called as
       follows:


  Page 1                                           (printed 9/3/91)


















  OPENFILTER(3A)                                     OPENFILTER(3A)



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

       The argument arg is the same as that passed to OpenFilter or
       OpenFilterV.  The pid and status are the process ID and exit
       status of the command.

  SEE ALSO
       read(2), write(2), fdopen(3), XtAppAddInput(3Xt),
       OpenReadPipe(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