From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <14ec7b180712171744g7ce6a243iba450447b14c1d62@mail.gmail.com> Date: Mon, 17 Dec 2007 18:44:24 -0700 From: "andrey mirtchovski" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] a question on APE In-Reply-To: <13426df10712171736i60f181aax4fdf2cf57594fa87@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13426df10712171736i60f181aax4fdf2cf57594fa87@mail.gmail.com> Topicbox-Message-UUID: 1c096ed6-ead3-11e9-9d60-3106f5b1d025 > 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 :)