Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!portal!cup.portal.com!David_Alan_Lee From: David_Alan_Lee@cup.portal.com Newsgroups: comp.windows.x Subject: Recovery from fatal IO errors Message-ID: <42939@cup.portal.com> Date: 4 Jun 91 04:30:55 GMT Organization: The Portal System (TM) Lines: 26 I have a program that needs to communicate with several displays. The problem is that if one of the displays crashes, say an X terminal that a user turns off, then I get a Fatal IO error. If I use XSetIOErrorHandler() I can trap this error, but no matter what I do, I cant recover from it. I do not want my program crashing just because one of the displays goes down. I have tried everything I can think of to handle this, including doing an XCloseDisplay() from within the error handler. If I return from the routine, it gets call again, over and over. I am able to avoid this by doing a longjump() out of the routine, but if I try to close the display my error handler gets called. If I reset the handler to the default my program exits. If I dont close the display, X cant free up my local resources, so eventially I will run out of virtual memory -- because I will have to open another display later. The only solution I have found is forking a child to handle each display. This does work, but I would prefer to have only 1 process. Does anyone know of another solution ? Please Email a copy of any responses. Thank you -- Dave Lee David_Alan_Lee@cup.portal.com