Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 11/03/84 (WLS Mods); site astrovax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!astrovax!wls From: wls@astrovax.UUCP (William L. Sebok) Newsgroups: net.unix-wizards Subject: Re: don't do long jumps in signal handlers Message-ID: <562@astrovax.UUCP> Date: Fri, 22-Mar-85 20:40:09 EST Article-I.D.: astrovax.562 Posted: Fri Mar 22 20:40:09 1985 Date-Received: Sat, 23-Mar-85 04:26:02 EST References: <312@calgary.UUCP> <2175@wateng.UUCP> <542@utcs.UUCP> Organization: Princeton Univ. Astrophysics Lines: 15 > I think the real problem is that UNIX allows one to catch signals at all. > Given that we don't have cheap processes a la Thoth, catching signals is a > necessary evil but signal handlers should be kept simple and in particular > should avoid using longjmp (if you have ever read and understood the source, > you won't want to use longjmp). Unfortunately if you wan't to interrupt a 4.2 read() from a terminal you have to do longjmp (or worse). In my opinion, if they didn't want signals to abort terminal reads they should have provided an explicit i/o abort function that could be called from the signal handler. -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,burl,cbosgd,decvax,ihnp4,noao,princeton,vax135}!astrovax!wls