[slime-devel] scripting via swank

Ahoj Suppose there is a long running lisp image with a swank server and I want to connect to it from shell scripts and evaluate lisp forms in an environment where *standard-output*, *standard-input* and *error-output* are bound to streams that correspond to stdout, stdin and stderr of the shell script. The only idea I had was to pass the pid of the shell script to the lisp and bind *standard-output* to (open "/proc/<pid-of-shell-script/fd/0" ...) which should work on linux. Anything nicer? Cheers, Gábor

* Gábor Melis [2007-01-25 19:09+0100] writes:
Ahoj
Suppose there is a long running lisp image with a swank server and I want to connect to it from shell scripts and evaluate lisp forms in an environment where *standard-output*, *standard-input* and *error-output* are bound to streams that correspond to stdout, stdin and stderr of the shell script.
The only idea I had was to pass the pid of the shell script to the lisp and bind *standard-output* to (open "/proc/<pid-of-shell-script/fd/0" ...) which should work on linux.
Anything nicer?
You could pass the file descriptors over a Unix socket. (I doubt though, that the usual CL-socket interfaces support that.) Helmut.
participants (2)
-
Gábor Melis
-
Helmut Eller