Deprecate setjmp/longjmp? [was Re: Maybe it's time to get rid of tcpwrappers/tcpd?]

Daniel P. Berrange berrange at redhat.com
Mon Apr 28 09:10:30 UTC 2014


On Mon, Apr 28, 2014 at 09:52:36AM +0200, Nikos Mavrogiannopoulos wrote:
> On Sun, 2014-04-27 at 23:02 +0100, Andrew Price wrote:
> > On 24/04/14 15:13, Lennart Poettering wrote:
> > > We probably should make setjmp()-freeness a requirement for
> > > all code included in Fedora.
> > 
> > Would it be worth the effort, and how feasible is it anyway?
> 
> setjmp and longjmp are tools, that one may use in a good or bad way.
> Along the same lines one could argue for dropping programs that use goto
> in Fedora (because everyone knows that goto is bad). 
> 
> 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.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


More information about the devel mailing list