Deprecate setjmp/longjmp? [was Re: Maybe it's time to get rid of tcpwrappers/tcpd?]
nmav at redhat.com
Mon Apr 28 11:36:04 UTC 2014
On Mon, 2014-04-28 at 10:10 +0100, Daniel P. Berrange wrote:
> > To the point, if a program uses setjmp and longjmp it is often that
> > there was no other way to do it. You cannot for example have a
> > co-routine/fiber implementation in C without setjmp() and longjmp().
> That's not correct - you can easily do coroutines using makecontext
> and swapcontext - both gtk-vnc and QEMU do this.
That's true and most modern co-routine libraries use makecontext and
swapcontext. However that isn't part of C and their man page mentions
"POSIX.1-2008 removes the specifications of makecontext() and
swapcontext(), citing portability issues"...
More information about the devel