Hi! I am use SuSe 7.2 x86 and openssh-2.9p1-7.rpm I got a problem using bitkeeper on my laptop where bitkeeper reported an I/O error while reading data from 'ssh'. After much debugging, and some help from the bitkeeper people, I found out that that clientloop.c doesn't handle interrupts gracefully. (It died when it got an EAGAIN error when writing to the application) After applying the following patch, everything started to work for me: *** clientloop-old.c Wed Oct 17 22:05:30 2001 --- clientloop.c Wed Oct 17 22:01:46 2001 *************** *** 937,947 **** } /* Output any buffered data for stdout. */ while (buffer_len(&stdout_buffer) > 0) { len = write(fileno(stdout), buffer_ptr(&stdout_buffer), buffer_len(&stdout_buffer)); ! if (len <= 0) { ! error("Write failed flushing stdout buffer."); ! break; } buffer_consume(&stdout_buffer, len); stdout_bytes += len; --- 937,953 ---- } /* Output any buffered data for stdout. */ while (buffer_len(&stdout_buffer) > 0) { + errno=0; /* Linux doesn't reset this */ len = write(fileno(stdout), buffer_ptr(&stdout_buffer), buffer_len(&stdout_buffer)); ! if (len <= 0) ! { ! if (errno != EAGAIN && errno != EINTR) ! { ! error("Write failed flushing stdout buffer."); ! break; ! } ! continue; } buffer_consume(&stdout_buffer, len); stdout_bytes += len; Regards, Monty CTO of MySQL AB
On Wed, Oct 17, 2001 at 10:27:27PM +0300, Michael Widenius wrote:> > Hi! > > I am use SuSe 7.2 x86 and openssh-2.9p1-7.rpm > > I got a problem using bitkeeper on my laptop where bitkeeper > reported an I/O error while reading data from 'ssh'. > > After much debugging, and some help from the bitkeeper people, I found > out that that clientloop.c doesn't handle interrupts gracefully. > (It died when it got an EAGAIN error when writing to the application) > > After applying the following patch, everything started to work for me:2.9 is very old, please check 2.9.9 at http://www.openssh.com/portable.html or try a recent snapshot.
--On Wednesday, October 17, 2001 9:48 PM +0200 Markus Friedl <markus at openbsd.org> wrote:> 2.9 is very old, please check 2.9.9 atYou have a rather odd definition of "very old"? 2.9 was released less than 6 months ago. -- Carson Gaspar - carson at taltos.org Queen Trapped in a Butch Body
Circa 2001-Oct-17 15:58:27 -0700 dixit Carson Gaspar: : --On Wednesday, October 17, 2001 9:48 PM +0200 Markus Friedl : <markus at openbsd.org> wrote: : : > 2.9 is very old, please check 2.9.9 at : : You have a rather odd definition of "very old"? 2.9 was released less than : 6 months ago. Markus (and Ben, and Damien, and others) are all pretty close to the code---cut them some slack. Hell, 2.9.9 is getting old for them, in code years.... -- jim knoble | jmknoble at pobox.com | http://www.pobox.com/~jmknoble/ (GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 262 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20011017/881b915c/attachment.bin