'(:input :output :output)
(make-array (1+ eazy-process::+max-rlimit-constant+) :element-type 'fixnum
A vector of rlimit resource value, where the index suggests +rlimit-XXX+, which is an integer (usually below 16)
This value does not affect the lisp process itself; The effect is applied to the child process only.
Rather than modifying this variable directly, use `with-rlimit' instead.
(fdspecs '(:input :output :output))
A class representing a process.
Returns an fresh array of fds available from lisp process.
Waitpid the process. If the process is alive, kill it with SIG first,
then with SIGKILL.
option is one of :nohang, :untraced, :continued.
Returns a value of the following signature:
(list (boolean ifexited)
When the value is inappropriate as defined in man wait(2),
some integer values may return NIL.
When :nohang is specified but no child has changed its state,
then it returns NIL instead.
`wait(0)', i.e. wait for any children, is not available.
Returns the file descriptor of the lisp process.
The returned fd is connected to the n-th fd of the child process through a pipe.
(fd P 1) ; --> 5
This means that the 5'th fd of the lisp process is connected to the 1st fd of the process P.
Return the pathname for each file descriptor.
Lisp can read/write to each fd by opening this file.
Since the buffer size of file-stream is implementation-dependent, and the
call to cl:read might cache a considerable amount of characters from the
file, we are not able to ensure that the same file can be opened more than once.
Even if you just cl:open the file and just cl:read-char the stream,
it might read the entire characters of the file into the buffer as a side-effect.
We just advise you not to open the file more than once.
Spawn a process, bind the process to PROCESS,
execute the body and finalize (= kill and wait w/ nohang) the process.
BODY works as an implicit progn, and the return value is that of the progn.
It does not synchronously wait the process. Therefore, it is the user's
responsibility to inhibit the early termination of the process.
The aim of finalization is to release the resources of the process e.g. file descriptor and pipes.
(with-open-process (p ("sleep" "10"))
Append/overwrite the current rlimit resouce limitation.
This does not affect the lisp process itself.
Only the spawned child process will be affected.
Command line string which is invoked in order to run the subshell. Default value is "sh -c".
The value is then followed by the command specified in shell-command, e.g. ,
when command = 'ls -la', the running command is "sh -c 'ls -la'".
It provides the ability to call the interpreters like perl/AWK easily.
The name/path of the interpreter must be separated by spaces from the options like '-c'.
Do not use complex things like --- LANG=C sh . The first word is always considered the pathname.
If you want to do complicated stuff, then do it inside the interpreter.
The process is forked, then the child process calls execvp with the name of
the interpreter. (This is defined in function `eazy-process:shell'.) The
actual pathname of the intepreter can be resolved using PATH environment
simple interface compatible to trivial-shell @
returns (values output error-output exit-status).
The input is read from the :input key argument.
:external-format --- specifies the decoding of the output.