Ambiguity in definition of setjmp/longjmp makes them much less useful

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Oct 10 06:48:32 AEST 1990


In article <:_A6T46 at xds13.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
> I think it reasonable not to guarantee longjmp behaviour from within
> signals. In fact, calling longjmp from within signals is evil. The only
> thing you should do within a signal routine is set a flag... anything
> else is a bug waiting to happen.

Correct.

> Of course, you need to do this in BSD, but BSD is buggier than a dog pound.

Say what? I've written large BSD applications that don't do anything
inside signal handlers other than set flags. Where's this ``need'' you
talk about? And if you're going to insist that BSD is buggier than SysV,
how about some proof?

---Dan



More information about the Comp.lang.c mailing list