[parisc-linux] rlogin: connection closed (SOLUTION)

Larry McVoy lm@bitmover.com
Mon, 2 Dec 2002 13:54:25 -0800


This fixes it.  Looks like a race, I wasn't inclined to dig further, this
got me past the problem.  I suspect that parisc fork() runs parent/child
in the opposite order from every other Unix and that causes a race but
I have not looked.

--lm

diff -Nur netkit-rsh-0.17/rlogind/rlogind.c NEW/netkit-rsh-0.17/rlogind/rlogind.c
--- netkit-rsh-0.17/rlogind/rlogind.c   Mon Dec  2 13:52:37 2002
+++ NEW/netkit-rsh-0.17/rlogind/rlogind.c       Mon Dec  2 13:48:48 2002
@@ -429,6 +429,7 @@
        if (netfd > 2) close(netfd);
        child(hname, termtype, lusername, authenticated);
     }
+    usleep(100000);
     close(slave);
     on = 1;
     ioctl(netfd, FIONBIO, &on);