[Top] [Prev] [Next]

pipe: fds, files - get read/write file pair for a pipe

include "pipe.m";
pipe:= load Pipe Pipe->PATH;
fds:    fn(): (ref Sys->FD, ref Sys->FD);
files:  fn(): (string, string);

Description
fds ( )

The fds opens a pair of files. One file is the read end of a simulation of a pipe for thread-to-thread communication and the other is the write end. The function returns a tuple with the read and write file descriptors, respectively.

In case the pipe cannot be created, fds returns (nil, nil).

files ( )

The files function returns a pair of file names to be opened. The first name is for the read end of a pipe and the second name is for the write end of a pipe.

In case the pipe cannot be created, files returns (' ', ' ').

Notes

The pipes are implemented by creating channels and associated files, which are uniquely named, in the /chan directory.

Files

/chan

See Also
file2chan - create file connected to Limbo channel in Chapter 8

open, create - open/create a file for reading or writing in Chapter 8

read, write, stream - read, write, or stream file in Chapter 8



[Top] [Prev] [Next]

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