Path: utzoo!attcan!uunet!mcvax!ukc!cam-cl!nmm From: nmm@cl.cam.ac.uk (Nick Maclaren) Newsgroups: comp.windows.x Subject: Re: Handling signals in X (was: Reading sockets from the Toolkit) Message-ID: <730@scaup.cl.cam.ac.uk> Date: 17 May 89 09:53:01 GMT References: <103532@sun.Eng.Sun.COM> <8905152110.AA20907@expo.lcs.mit.edu> <13849@pasteur.Berkeley.EDU> Sender: news@cl.cam.ac.uk Reply-To: nmm@cl.cam.ac.uk (Nick Maclaren) Organization: U of Cambridge Comp Lab, UK Lines: 31 dheller@cory.Berkeley.EDU (Dan Heller) writes: > Both X and the intrinsics need to handle -all- signals intelligently, or > disaster is definitely awaiting. .... I agree, but Chris D. Peterson is also right about the fact that not everyone has UNIX. I am afraid that designing this area is EXTREMELY nasty and there are very few people in the world with the requisite skills. Yes, it needs to be done, but it must be done extremely carefully and with great attention paid to getting as wide a range of input as possible. For example, there are 4 'ANSI' C compilers for IBM MVS, which is about as different from UNIX as you can hope to achieve. Only one of these (the one I wrote!) supports longjmp from out of a SIGINT handler called from within I/O (e.g. waiting for terminal input). Whether this can be done is clearly critical to the design of the X signal handling. The ANSI C description of signal handling is about as portable as anything I have seen that is flexible enough to use. However, there are a good many aspects of its design that are severely system-dependent, and cannot be done on systems that use an exception model that is radically different from the UNIX one. I could go into details, but I don't think this forum is appropriate. The X Consortium are quite right to have stayed out of this minefield so far, even though it needs to be crossed at some stage. Nick Maclaren University of Cambridge Computer Laboratory nmm @ cl.cam.ac.uk