Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!vixen.cso.uiuc.edu!howland.reston.ans.net!EU.net!peer-news.britain.eu.net!newsfeed.ed.ac.uk!edcogsci!jeff
From: jeff@cogsci.ed.ac.uk (Jeff Dalton)
Subject: Re: System calls and Pipe (KCL)
Message-ID: <DKz4Jv.4Bu.0.macbeth@cogsci.ed.ac.uk>
Organization: Centre for Cognitive Science, Edinburgh, UK
References: <30ECEFAD.28F3@hpbbrd.hp.com>
Date: Wed, 10 Jan 1996 16:31:06 GMT
Lines: 28

In article <30ECEFAD.28F3@hpbbrd.hp.com> Eric Lavarde <ericl@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
