On Thu, Feb 25, 2016 at 12:47:15PM +0300, Nick Zavaritsky <[email protected]> 
wrote:
> 1) UB from the libev point of view, or
> 2) works with certain versions of libev on certain OSes, but may break 
> without warning, or
> 3) is fully supported and is a part of the public API contract.

It's certainly 1 or 2.

Even if it were supported under some circumstances, I'd say whatever thing
you are trying to do is illdesigned - you'd have to wrap every call, and
libev is not the only source of errors - if libev runs out of memory for
example, then the program might crash at any time (e.g. because of kernel
OOM, or because it needs more stack space or...).

If you want to catch errors and do something sensible, the libev
errorhandler is not your solution. In fact, no in-process solution exists
- you should have a watchdog that does the right thing in fatal situations
such as this.

Just saying... all this sounds like some inane customer feature request
form a customer who doesn't know what he is doing and wants to go headlong
through the nearest wall.

> > You won't get leaks, but you will likely have a non-working loop
> > afterwards - nothing legal can be done with it anymore.
> 
> Can we legally kill it with ev_loop_destroy()?

Not legally, and it probably will not work in practise either.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/libev

Reply via email to