Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!caen!uwm.edu!bionet!agate!ucbvax!CADFX.CCAD.UIOWA.EDU!koppes From: koppes@CADFX.CCAD.UIOWA.EDU (Beth Koppes) Newsgroups: comp.windows.x.motif Subject: RSH Problems Message-ID: <9104161928.AA03622@cadfx.ccad.uiowa.edu> Date: 16 Apr 91 19:28:58 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: CAD-Research, University of Iowa, Iowa City, Iowa Lines: 27 Platform: Vax Station 3100 Motif Version: 1.03a I have discovered that a call to MrmOpenHierarchy() is interfering with a call to system(). The Mrm...() call fetches 18 uid files. The system() call executes rsh. If I put the system() call before the Mrm...() call, the remote command executed by rsh completes, the rsh process completes, and system() returns to my program. If I put the system() call after the Mrm...() call, the remote command completes, but the rsh process does not. The result is that system() does not return. A netstat on the local machine shows two network connections still present with statuss of CLOSE_WAIT. A netstat on the remote machine shows statuses of FIN_WAIT_2. It appears that the rsh process is holding the connection open. If I press [Return] (thus sending a newline to standard input of my program) the rsh process completes and system() returns. I don't know why the [Return] satisfies the rsh process. It does not matter what remote command is executed -- ls will do it. I eliminated the local .cshrc and remote .cshrc to ensure that no unexpected reads were coming from them. Can anyone suggest a cure for this problem?