home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!ox-prg!gordon
- From: gordon@robots.oxford.ac.uk (Gordon Buxton)
- Newsgroups: comp.lang.lisp
- Subject: Re: run-program in kcl
- Keywords: run-program, common lisp, kcl, load.
- Message-ID: <4280@inca.comlab.ox.ac.uk>
- Date: 14 Aug 92 09:49:39 GMT
- References: <1992Aug13.194657.6098@cs.albany.edu> <16fpq4INN848@early-bird.think.com>
- Sender: news@comlab.ox.ac.uk
- Organization: Robotics Research Group, Engineering Science Dept, Oxford, UK.
- Lines: 46
-
- In article <16fpq4INN848@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
- >In article <1992Aug13.194657.6098@cs.albany.edu> saxena@cs.albany.edu (Tushar Saxena) writes:
- >>There is a function in common lisp called RUN-PROGRAM in Sun Common Lisp.
- >
- >This isn't a Common Lisp function, it's a Lucid extension.
- >
- >>First of all, has anyone ever heard of it? Secondly, what does this
- >>function do?
- >
- >It runs a normal Unix program, as if you'd executed it from the shell. It
- >can optionally connect the input and/or output streams of the program to
- >Lisp streams. It's fully documented in the Working Beyond the Lisp
- >Environment section of the Advanced User's Guide chapter of the manual.
- >
- >> And lastly, what is its counterpart in kcl. I know for sure
- >>that my version of kcl does not support it.
- >
- >There probably isn't a direct counterpart in KCL, since KCL doesn't provide
- >many extensions to CL. The closest thing is probably calling the Unix
- >execlp(3) function.
- >
- >barmar@think.com {uunet,harvard}!think!barmar
-
-
- There is a sort-of similar function in kcl called 'system'. I don't
- think it is as good as the run-program in lucid, but it might be what
- you need ... eg:
-
- >(system "ls")
- beef factory filesys.lsp plan user.o
- cd.o features filesys.o user.lsp work-elements
- 0
-
- >(help 'system)
- -----------------------------------------------------------------------------
- SYSTEM [Function]
-
- Args: (string)
- KCL specific: Executes a Shell command as if STRING is an input to the Shell.
- Not all versions of KCL support this function.
- -----------------------------------------------------------------------------
-
- It works for me on akcl 1.605 for Unix and the current beta release
- akcl for dos.
-
- Gordon.
-