[Ecls-list] String printing error?
goffioul at imec.be
Fri Feb 4 07:40:32 UTC 2005
> I just succeeded creating a two-way tcp stream to telnet. :)
> BSD-SOCKETS> (read-line *str*)
> BSD-SOCKETS> (coerce * 'list)
> (#\H #\E #\L #\L #\O #\Return)
> The problem is the missing closing ". SBCL exhibits the same
> What's going on? Shouldn't it print like "HELLO^M" ?
I don't know if it is related, but this reminds me a problem I had
with pipe and child processes. Bascially, I wanted to open an ssh
tunnel to a remote server, send commands and read back the results.
(ext:run-program...) returns a two-way-stream made of pipes that you
can use for the communication. However, when testing it, I noticed
that the #\Return character was screwing up the communication, for
example I sent "ls -r\n" and it receives "ls -\r\n". Looking at the
code used to create the pipes, I noticed that they were opened in
text mode, with automatic newline conversion. Turning it to binary
mode solved the problem.
Hope this helps.
More information about the ecl-devel