[Nickle] pipe() continued

Bart Massey bart at cs.pdx.edu
Sat Oct 11 14:33:37 PDT 2003


After some slight thought, here's my proposal for
re-implementing pipe(): get rid of it, and replace it with
filter() which potentially returns a *pair* of files.  The
socketpair(2) code for pipe is cool, but I think ultimately,
we should just provide one or two pipes.

I'd suggest

  typedef union {
    void ignore;
    file channel;
  } filter_channel;

  void filter(string prog, string[*] args,
              filter_channel &input,
	      filter_channel &output);
	      
or

  file[2] filter(string prog, string[*] args,
                 bool input_channel,
		 bool output_channel);

Any preferences or thoughts?  Let me know, and I'll
implement it: I need it RSN (like today).

	Bart



More information about the Nickle mailing list