Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!duke!romeo!pusateri From: pusateri@romeo.cs.duke.edu (Thomas J. Pusateri) Newsgroups: comp.windows.x Subject: Re: XtAppAddInput Behaviour Summary: Don't close socket before exiting XtMainLoop Message-ID: <14593@duke.cs.duke.edu> Date: 30 May 89 22:15:11 GMT References: <1228@speedy.mcnc.org> Sender: news@duke.cs.duke.edu Distribution: usa Lines: 23 In article <1228@speedy.mcnc.org>, trey@mcnc.org (Joseph R. Bishop) writes: > I ran a small test program where I wrote a single approximately 20 > character long string to the peer socket. I expected the procedure > to be called once and the character string read. Upon running the > the test program, the character string was successfully read. > However, instead of proceeding on with the rest of the test program, > an infinite loop was entered with the "proc" procedure being called > over and over. I experienced a similar problem and realized that I had closed the end of the socket that was writing before I exited the Xt main loop. When you do this, you get an infinite loop because its waiting for an EOF. Try keeping the socket open until you exit your X program. If you want an example or a demonstration, feel free to stop by or send mail or call. Tom Pusateri Duke Medical Center Nanoline Duke Bldg. Room 384A 681-3048 pusateri@nbsr.mc.duke.edu