libera/#lisp - IRC Chatlog
Search
12:01:27
wafelack
Hey, using CLisp, is it possible to pass a stream to `ext:run-program` as for input ? We can do `:input :stream` but I can't see how I could directly pass a « pre-loaded » input stream.
12:11:57
pjb
wafelack: lisp streams are not posix file descriptors. run-program calls a posix program (with fork/exec) that expects file descriptors.
12:12:36
pjb
wafelack: so you need to have a thread that will read from the lisp stream and write to the stream with the underlying file descriptor to the :input :stream
12:17:32
pjb
that said, if your lisp stream has an underlying file descriptor, you could retrieve it and use something like: (ext:run-shell-command (format nil "bash -c 'your-program 1<&~A-'" file-descriptor))
23:04:07
holycow
the problem is, when i am in sbcl and run a demo it looks like running each of the demos creates a socket connection to the demo and the sbcl command line is "captured" by the process
23:04:32
holycow
so i don't get a new sbcl line where i could dump the image, i get: * New connection id - 42 - #<SERVER {100510C693}>