From: Eric Lavarde
Subject: System calls and Pipe (KCL)
Date: 
Message-ID: <30ECEFAD.28F3@hpbbrd.hp.com>
Hi,

I'm using a KCL interpreter under unix and a newby in Lisp and was
asking myself if there are commands like the ones in C:
    * "system" to make a call to a system command or an executable
and
    * "popen" to use the output or input of an executable as a file
      with "read" and "write" commands.

And more generally, where could I find help on system dependent
Lisp commands (that wouldn't be in Steele's Bible)?

I would be grateful for any help,
Eric

---
·····@hpbbrd.hp.com
It's nice that there are so many dumb people on Earth,
I feel more intelligent.
From: Jeff Dalton
Subject: Re: System calls and Pipe (KCL)
Date: 
Message-ID: <DKz4Jv.4Bu.0.macbeth@cogsci.ed.ac.uk>
In article <·············@hpbbrd.hp.com> Eric Lavarde <·····@hpbbrd.hp.com> writes:
>Hi,
>
>I'm using a KCL interpreter under unix and a newby in Lisp and was
>asking myself if there are commands like the ones in C:
>    * "system" to make a call to a system command or an executable
>and
>    * "popen" to use the output or input of an executable as a file
>      with "read" and "write" commands.
>
>And more generally, where could I find help on system dependent
>Lisp commands (that wouldn't be in Steele's Bible)?

You should be able to find some documentation in the KCL sources,
if it hasn't been made available in some other way at your site.

There is a system function.  For instance, you can write

  (system "ls")

"popen" and the like are harder.  Some versions of KCL (such as
GNU Common Lisp -- GCL) have something along those lines built in.

It's not too hard to write such things yourself using the C code
facilities of KCL, but it's a bit tricky.  I have some code I could
probably make available that might help.  Let me take a look...

-- jeff