At last, here it is!

I have finally learn how to emulate Java pipes.

You know can now run programs with full-duplex pipes, for reading
output and writing input (actually, one-and-a-half duplex technically,
you can write to a program's input and read both the output stream and
the error stream).

To run a program with pipes, first open with with popen():

data = popen("<full path to program>"), {"all", "the", "args"})

for example:

data = popen("/bin/echo", {"Hello", "World"})

popen() returns a sequence with the pid of the program and
3 handles {pid, pin, pout, perr}

to write input, use os_write()

n = os_write(the_programs_input_handle, the_text_to_write)

n = os_write(pin, "testing")

os_write() returns the number of characters written, or -1
if the write failed.

os_read() is used to read the output of a program.

s = os_read(the_output_handle, number_of_chars_to_read)

for example

s = os_read(pout, 256)

NOTE: all functions and variables and constants starting with
"os_" are actually declared in cpipe.e, not pipeio.e, however
pipeio.e includes cpipe.e so including pipeio.e gives access to all the
os_* routines and variables.

Files:

README - this file
cpipe.e - file with c library interface and function wrappers
pipeio.e - the main file, gives access to popen()
demo1.exu - demonstrates reading the output of an eu program
demo2.exu - demonstrates reading and writing to a program
subprocess1.exu - the program read by demo1.exu
subprocess2.exu - an eu program supposed to mimic cat - obviously it didnt work

