[Top] [Prev] [Next]

pipe

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

Synopsis

include "lib.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 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 via by creating channels and associated files (uniquely named) in the /chan directory.

Files

/chan

See Also
file2chan

Creating file/channel associations

open

Converting file name to ref FD

read

Accessing a file via ref FD



[Top] [Prev] [Next]

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