[Top] [Prev] [Next] [Bottom]


[Contents] [Index]

pipe - create a pipe

include "sys.m";
sys := load Sys Sys->PATH;

pipe: fn(fds: array of ref FD): int;

## returns 0 on success; -1 on failure.

Description

The pipe system call allocates a pipe from the pipe device and returns in the fds array file descriptors for the two pipe ends. Both returned file descriptors are opened for both reading and writing (Sys->ORDWR).

The array, fds, passed to the system call must have a length of at least 2. Array members of index 2 or higher, if any, are not changed.

Although the fstat system call on the file descriptors will return the expected names (data and data1, respectively) those names are nowhere added to the namespace by this system call.

The pipe system call returns 0 on success; -1 on failure.:

See Also

pipe - the pipe device in Chapter 2



[Top] [Prev] [Next] [Bottom]

infernosupport@lucent.com
Copyright © 1997, Lucent Technologies, Inc.. All rights reserved.