<div dir="ltr">Hi Rafael,<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 12, 2014 at 11:20 PM, Sistemas <span dir="ltr"><<a href="mailto:sistemas@dedaloingenieros.com" target="_blank">sistemas@dedaloingenieros.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi:<br>
<br>
I'm trying to start some processes and connect them using pipes with ABCL<br>
(like Unix shell pipes). I've reviewed the documentation but I haven't found<br>
anything. Are I missing something? If not, are there any plans of adding<br>
input, output and error parameters for run-program (like SBCL, CCL, etc.)?<br>
<br></blockquote><div><br></div><div>There's a function like that in run-program.lisp:</div><div><br></div><div><div>(defun run-program (program args &key environment (wait t) clear-environment)</div><div>  "Run PROGRAM with ARGS in with ENVIRONMENT variables.</div>
<div><br></div><div>Possibly WAIT for subprocess to exit.</div><div><br></div><div>Optionally CLEAR-ENVIRONMENT of the subprocess of any non specified values.</div><div><br></div><div>Creates a new process running the the PROGRAM.</div>
<div><br></div><div>ARGS are a list of strings to be passed to the program as arguments. </div><div><br></div><div>For no arguments, use nil which means that just the name of the</div><div>program is passed as arg 0.</div>
<div><br></div><div>Returns a process structure containing the JAVA-OBJECT wrapped Process</div><div>object, and the PROCESS-INPUT, PROCESS-OUTPUT, and PROCESS-ERROR streams.</div><div><br></div><div>c.f. <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Process.html">http://download.oracle.com/javase/6/docs/api/java/lang/Process.html</a></div>
<div><br></div><div>Notes about Unix environments (as in the :environment):</div><div><br></div><div>    * The ABCL implementation of run-program, like SBCL, Perl and many</div><div>      other programs, copies the Unix environment by default.</div>
<div><br></div><div>    * Running Unix programs from a setuid process, or in any other</div><div>      situation where the Unix environment is under the control of</div><div>      someone else, is a mother lode of security problems. If you are</div>
<div>      contemplating doing this, read about it first. (The Perl</div><div>      community has a lot of good documentation about this and other</div><div>      security issues in script-like programs.</div><div><br></div>
<div>The &key arguments have the following meanings:</div><div><br></div><div>:environment </div><div>    An alist of STRINGs (name . value) describing new</div><div>    environment values that replace existing ones.</div>
<div><br></div><div>:clear-env</div><div>    If non-NIL, the current environment is cleared before the</div><div>    values supplied by :environment are inserted.</div><div><br></div><div>:wait </div><div>    If non-NIL, which is the default, wait until the created process</div>
<div>    finishes. If NIL, continue running Lisp until the program</div><div>    finishes.</div><div>"</div></div><div><br></div><div>Does that solve your problem?</div><div><br></div></div><div><br></div>-- <br><div dir="ltr">
Bye,<div><br></div><div>Erik.</div><div><br></div><div><a href="http://efficito.com/" target="_blank">http://efficito.com</a> -- Hosted accounting and ERP.</div><div>Robust and Flexible. No vendor lock-in.</div></div>
</div></div>