PIPE - create an interprocess communication channel

     int pipe(fd)

     0    on success.
     -1   on failure and sets errno to indicate the error.

     returns  two  file  descriptors, fd[0] and fd[1]
     fd[0] is opened for reading
     fd[1] is opened for writing

        The standard programming model is that after  the  pipe  has
     been set up, two (or more) cooperating processes (created by
     subsequent fork(2V) calls) will pass data through  the  pipe
     using read(2V) and write(2V).
        Pipes are really a special case of  the  socketpair(2)  call
     and, in fact, are implemented as such in the system.
        Should more than {PIPE_BUF} bytes be necessary in  any  pipe
     among a loop of processes, deadlock will occur.

FORK - create a new process

     int fork()

     On success, fork()  returns  0  to  the  child  process  and
     returns  the  process  ID of the child process to the parent
     process.
     On failure, fork() returns -1 to the  parent  pro-
     cess, sets errno to indicate the error, and no child process
     is created.

     fork() creates a new process (child  process) which is
     almost an exact copy of the calling process.
     The child process has a unique process ID.
     The child process has its own copy of  the parent's descriptors.
     The child process has its own copy of the  parent's open directory streams.
     etc.

        When a process forks (see fork(2v)), all descriptors for the
     new  child process reference the same objects as they did in
     the parent before the fork.  If a new process is then to  be
     run  using  execve(2V),  the  process would normally inherit
     these descriptors.  Most of the  descriptors  can  be  rear-
     ranged  with  dup(2V)  or  deleted  with  close() before the
     execve() is attempted, but if some of these descriptors will
     still  be  needed  if the execve() fails, it is necessary to
     arrange for them to be closed if the execve() succeeds.  The
     fcntl(2V)  operation  F_SETFD  can be used to arrange that a
     descriptor will be closed after a successful execve(), or to
     restore  the  default  behavior,  which  is to not close the
     descriptor.

CLOSE  - delete a descriptor

     int close (fd)

     0    on success.
     -1   on failure and sets errno to indicate the error.

         A close of all of a process's descriptors  is  automatic  on
     exit(),  but  since there is a limit on the number of active
     descriptors per process, close() is necessary  for  programs
     that deal with many descriptors.

DUP - duplicate a descriptor

     int dup(fd)

     The new descriptor returned by the call is the  lowest  num-
     bered  descriptor  that  is not currently in use by the pro-
     cess.
     On failure, they return -1 and set errno to indicate the error.

        dup() duplicates an existing object descriptor.   The  argu-
     ment  fd  is  a small non-negative integer index in the per-
     process descriptor table

        This is like open but uses the file descriptor provided as
     the arguament.

        With int dup2(fd1, fd2), fd2 specifies the desired value of
     the new descriptor. If descriptor fd2 is already in use, it is
     first deallocated as if it were closed by close(2V).

EXEC - execute a file

     execl, execv, execle, execlp, execvp

     These functions  return  to  the  calling  process  only  on
     failure.  They return -1 and set errno to indicate the error

        exec() in all its forms overlays the  calling  process  with
     the  named  file,  then  transfers to the entry point of the
     core image of the file. There can be no return from a  suc-
     cessful exec(); the calling core image is lost.

        execl()  is  useful  when  a
     known  file  with known arguments is being called

        execv() version is useful when the number  of  arguments
     is unknown in advance;

        execlp() and execvp() are called with the same arguments  as
     execl()  and  execv(),  but duplicate the shell's actions in
     searching for an executable file in a list  of  directories

EXIT - terminate a process after performing cleanup

     exit(status)

        exit() terminates a process by calling exit(2V)  after  cal-
     ling  any  termination  handlers  named by calls to on_exit.
     Normally, this is just the  Standard  I/O  library  function
     _cleanup.  exit() never returns.



FOPEN - open a stream

     fopen, freopen, fdopen

     FILE *fopen(filename, type)
     char *filename, *type;
     FILE *stream;

     If  the open succeeds, fopen() returns a
     pointer to be used to  identify  the  stream  in  subsequent
     operations.

        fopen() opens the file named by filename  and  associates  a
     stream  with  it.

        fdopen() associates a stream with the  file  descriptor

EXIT - terminate process

    void exit (status)

        Exit terminates the calling process and passes status to the
    system for inspection.Returning from main in a C program has the 
    same effect as exit.All file descriptors open in the calling process
    are closed.All files created by tmpfile(3C) are removed, etc.
