Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!samsung!usc!elroy.jpl.nasa.gov!jato!mars.jpl.nasa.gov!kaleb From: kaleb@mars.jpl.nasa.gov (Kaleb Keithley) Newsgroups: comp.windows.x Subject: What is the politically correct way... Message-ID: <3833@jato.Jpl.Nasa.Gov> Date: 25 May 90 20:58:01 GMT Sender: news@jato.Jpl.Nasa.Gov Reply-To: kaleb@mars.jpl.nasa.gov (Kaleb Keithley) Organization: Jet Propulsion Laboratory, Pasadena, CA. Lines: 18 to detect that the server has closed the connection to a client? I have a (psuedo?) client that only sends XEvents to other clients. When the user ends a session and logs out (under xdm) the server resets and closes all client connections. Since my client is not reading the event queue, it does not detect the closure until the next time it tries to send. I'd like to detect the closure, and do a gracefull exit, rather than suffer the consequences of Xlib exit()ing for me. I'm running under SunOS 4.0.3/4.1, so I have select() available as an option. In fact, I tried select()ing on error conditions on the display->fd, but this always seems to indicate an error. I'm going to keep playing with it, but I'd appreciate any ideas/thoughts others might have. Thanks. kaleb@thyme.jpl.nasa.gov Jet Propeller Labs Kaleb Keithley