Xref: utzoo comp.windows.x:31854 comp.windows.x.motif:1727 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!bloom-beacon!deccrl!news.crl.dec.com!decvax.DEC.COM!evans From: evans@decvax.DEC.COM (Marc Evans) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Re: how to trap f.kill Keywords: XSetIOErrorHandler Message-ID: <521@decvax.decvax.dec.com.UUCP> Date: 25 Jan 91 13:18:30 GMT References: <1991Jan22.010234.15702@sat.uucp> Sender: news@decvax.dec.com.UUCP Reply-To: evans@decvax.DEC.COM Followup-To: comp.windows.x Organization: Synergytics Lines: 17 In article <1991Jan22.010234.15702@sat.uucp>, tony@sat.uucp writes: |> I need to trap the f.kill issued by the window manager (at user command) |> and do some cleaning up before my application exits; is there any way to |> trap this "event or signal" ? Use the XSetIOErrorHandler function to set up a function to be called when the Fatal IO error occurs, one of which would be a server disconnection. You will need to be careful here, in that the only other X calls you should make are to free memory. The function is not expected to return, so be sure that it doesn't. - Marc -- =========================================================================== Marc Evans - WB1GRH - evans@decvax.DEC.COM | Synergytics (603)635-8876 Unix and X Software Contractor | 21 Hinds Ln, Pelham, NH 03076 ===========================================================================