[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Calls from CLISP



On Jun 23,  4:44pm, Bruno Haible wrote:
> Subject: Re: System Calls from CLISP
> Art Nuzzo <artn@bs724.comm.mot.com> writes:
> > Is there any way to place system calls from inside CLISP? I am working on a
> > project that would use CLISP to gather information from the operating
system
> > and then process the information.
>
> Yes, this is possible. CLISP's source contains pre-made bindings to two
> operating systems: Linux and AmigaOS. You can create your own binding
> by { looking at | taking parts of | generate a module similar to }
> clisp/src/bindings/linux/*. Doc about modules and the FFI is in
> clisp/doc/foreign.txt and clisp/doc/module.txt.
>
> And of course you can call external programs, using the functions
> `run-shell-command' and `run-program'.
>
>
>                     Bruno
>
>
>-- End of excerpt from Bruno Haible


Probably for what I am doing 'run-shell-command' or `run-program' ('SHELL' or
EXECUTE) would be sufficient since I would be calling standard UNIX system
commands (such as ps or who or ping, etc). Is there any way to capture the unix
command output in a variable so it can be processed? It looks like the unix
command output is being printed to the screen and the value returned is 0.

Is there any documentation available that describes the differences between
'run-shell-command' and `run-program' and 'SHELL' and 'EXECUTE'?


Thanks for any help,


Art Nuzzo
Fixed Products Design Center
Motorola