Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pipe(2) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

read, readx

select

write, writex

sh

pipe

Purpose

     Creates an interprocess channel.

Syntax

     int pipe (fildes)
     int fildes[2|;

Description

     The  pipe system  call  creates  an interprocess  channel
     called a pipe and returns two file descriptors, fildes[0|
     and fildes[1|.   The fildes[0| file descriptor  is opened
     for reading and fildes[1| is opened for writing.

     A  read on  file descriptor  fildes[0| accesses  the data
     written to fildes[1| on a first-in-first-out basis.

     When writing, at least 16,384  bytes of data are buffered
     by the pipe before the writing process is blocked.

     Warning:  The actions  of the pipe system  call are unde-
     fined if the fildes parameter &pointsout..

Return Value

     Upon successful completion, a value of 0 is returned.  If
     pipe fails, a value of -1 is returned and errno is set to
     indicate the error.

Diagnostics

     The pipe system  call fails if one or  more the following
     are true:

     EMFILE     199 or more file descriptors are already open.

     ENFILE     The system file table is full.

Related Information

     In  this book:   "read, readx,"   "select," and   "write,
     writex."

     The  sh   command  in   AIX  Operating   System  Commands
     Reference.

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