-
Notifications
You must be signed in to change notification settings - Fork 51
Description
https://github.com/guicho271828/eazy-process
In run-program interface in the popular implementations, piping between subprocesses are hard. It requires either reading the entire output stream and packing the contents as a new string-input-stream, or using some other implementation-specific functions. Compatibility libraries e.g. trivial-shell or inferior-shell, often depend on run-program, but not implement "other impl-specific functions", therefore piping is again not clean. Iolib also has run-program that allows easy piping, but it is restricted to 3 fds: input,output,error.
Eazy-process provides a declarative and thin layer for manipulating processes. It is built on the concept of UNIX: "everything is a file" and do not provide interfaces to streams.
Currently, the only implementation verified to work as expected is SBCL on linux. CCL does not pass the test due to errors in opening /def/fd/[fd] to read/write the input/output/error directly. However, you can avoid this issue by writing the output to a temporary file and opening the file.
I suspect the same test might pass on the other OSes because it is a linux-specific problem (realpath(3) returns NULL and sets errno EACCES on those special files).
I used part of codes in SBCL and trivial-shell, so the current MIT licence might have to be changed.