[Ecls-list] ecl_stream_to_handle bug? (Was: Latest changes)

Dave Roberts dave at vyatta.com
Wed Nov 1 17:58:30 UTC 2006


Juan Jose Garcia-Ripoll wrote:
> Well, the thing is that this routine does not know how to deal with
> sockets and sllime does communicate via sockets with ECL.

I'm not sure exactly how Slime does its thing, but sockets still have 
file handles, no? That is, at least under Unix-like systems, I would not 
expect this routine to return -1 unless the particular stream was closed.

I could see ecl_stream_to_handle returning -1 if Slime is doing some 
fancy intercept of output and *standard-output* (for instance) is a 
custom stream (Gray or simple or something) that doesn't use a file 
handle at all in the stream itself. Clearly, there is a file handle 
buried deep down in Slime somewhere, associate with the socket that 
connects to Emacs, but perhaps it's nowhere near the objects bound to 
*standard-input/output*.

Anyway, my use case is that I'm doing some direct terminal IO (termios 
stuff). I want to grab the file handles associated with standard 
input/output and pass them to isatty and if I'm working with a terminal 
enable certain raw IO. I wouldn't expect the raw IO to work with Slime, 
obviously, but I was not expecting a -1 from ecl_stream_to_handle.

-- Dave





More information about the ecl-devel mailing list