koppes@CADFX.CCAD.UIOWA.EDU (Beth Koppes) (04/17/91)
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?