Usage
var x = new(Process, $S("ls"), $S("r"));
char c;
while (not seof(x)) {
sread(x, &c, 1);
print("%c", $I(c));
}
sclose(x);
Operating System Process
The Process type is a wrapper for an operating system process as constructed by the unix-like call popen. In this sense it is much like a standard file in the operating system but that instead of writing data to a location you are writing it as input to a process.
struct Process {
FILE* proc;
};
$ alloc dealloc assign cast cmp eq neq gt lt ge le copy hash hash_data size swap name brief description definition format_to format_from new del construct destruct with start stop join running sopen sclose sseek stell sflush seof sread swrite