RSH problem is back

Kees Bakker (
Thu, 7 Nov 1996 15:29:59 +0100

Since about 1.3.86 the well-known rsh problem is back. A command like:

rsh turku cat some-file </dev/null

might truncate the tail of the output. This was reported about a year ago,
and in two areas a solution was found (I think). One was to fix rsh.c so
that it does not quit until the remote end stops (even if there is a EOF in
stdin). The second was a fix in the kernel as I remember, but I could be

Anyway, I spend an evening building kernels and rebooting, and I found that
in 1.3.86 it works fine, but in 1.3.87 it doesn't. (I hope I have these
numbers right, it has been a few weeks ago).

Can someone confirm that this is really a problem? Here is the shell script
to use for testing:

#! /bin/sh

if [ ! -f null ]
dd if=/dev/zero of=null count=100
echo 'End of File' >>null
rsh localhost cat null </dev/null

If you run it on non-linux platforms you will see the text "End of
File". As long as the 'receiving' rsh is on Linux it will fail.

I am running 2.0.21 at the moment, but I think it was not fixed in
2.0.2[234], nor in 2.1.x.

telephone:  +31 33 455 85 84                Tasking Software BV
fax:        +31 33 455 10 05                P.O. Box 899
email:         3800 AW  Amersfoort
WWW:          The Netherlands
CompuServe: GO TASKING
     -----  Quality Development Tools Worldwide  -----
Programmers get overlayed