pipe

pipe — creates a pipe.

Syntax

pipe ()

		

Arguments

none

Returns

A list of the read pipe and the write pipe, each as a file pointer.

Description

This function creates an un-named pipe.

Example

Gamma> pipe1 = pipe();
(#<File:"read_pipe"> #<File:"write_pipe">)
Gamma> pread = car(pipe1);
#<File:"read_pipe">
Gamma> pwrite = cadr(pipe1);
#<File:"write_pipe">
Gamma> write (pwrite, "This is a test");
t
Gamma> read (pread);
"This is a test"
Gamma>