From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.bitmover.com (bitmover.com [192.132.92.2]) by dsl2.external.hp.com (Postfix) with ESMTP id 3F54F4829 for ; Mon, 2 Dec 2002 14:56:38 -0700 (MST) Date: Mon, 2 Dec 2002 13:54:25 -0800 From: Larry McVoy Message-Id: <200212022154.gB2LsPc31908@work.bitmover.com> To: parisc-linux@lists.parisc-linux.org, phi@hpfrcu81.france.hp.com Cc: dev@bitmover.com Subject: [parisc-linux] rlogin: connection closed (SOLUTION) Sender: parisc-linux-admin@lists.parisc-linux.org Errors-To: parisc-linux-admin@lists.parisc-linux.org List-Help: List-Post: List-Subscribe: , List-Id: parisc-linux developers list List-Unsubscribe: , List-Archive: 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);