don't do long jumps in signal handlers
William L. Sebok
wls at astrovax.UUCP
Sat Mar 23 11:40:09 AEST 1985
> 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
More information about the Comp.unix.wizards
mailing list