(lispkit system os)
Library (lispkit system os)
currently defines a single procedure system-call
for invoking external binaries as a sub-process of the LispKit interpreter. This library is operating system specific and requires careful usage in portable code.
Executes the binary at path passing the string representation of the elements of list args as command-line arguments. env is an association list defining environment variables. Both keys and values are strings. The output generated by executing the binary is directed towards port, which is a textual output port. The default for port corresponds to current-output-port
, a parameter object defined by library (lispkit port)
. Providing #f
as port will send the output to /dev/null
. input is an optional string which can be used to pipe data into the binary as input. The current implementation is not able to handle interactive binaries. system-call
returns the result code for executing the binary (0
refers to a regular exit).
Last updated