libev error handling
Georgy Kirichenko
georgy at tarantool.org
Wed Feb 3 09:35:15 CET 2016
Hi!
We use libev in our project (tarantool.org) and a problem with how libev
handles its internal errors.
Periodically we need to create a new thread with libev pool and async. But in
some cases process can haven't enough file descriptors to create pipe in
evpipe_init (called by ev_async_start). In case of error libev will call
ev_syscall and return to pipe creation.
ev_syscall can abort process (this is unacceptable for us) or can callback if
installed. But installed callback can't do nothing to break evpipe_init loop.
To fix this i create a patch, that allow early descriptors initialization at
ev_loop_new, that can return NULL in case of errors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ev.patch
Type: text/x-patch
Size: 3374 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20160203/1413de38/attachment.bin>
More information about the libev
mailing list