> Anyone ever done a select on a socket in ape? > the links port does that and it works fine, at least for a while.
the code snippet you gave is suspect, although i don't know how that relates to the stack trace. libssh2 lacks documentation, but from the little that i read libssh2_channel_read() can return zero without receiving EOF from the remote site. one needs to go through libssh2_channel_eof() or something to that effect to check whether the other side closed, and the code above doesn't do it (it's my fault, i hadn't gotten to debugging that part). then the code needs to do it for stderr too :)