Hi,
this problem came up with 3.8, worked fine with 3.6 before.
I have a g_thread_pool and libev, following pseudocode
create_thread_pool
set_and_start_ev_signal_handlers
was working fine, with 3.8 it does not work any longer, my current
workaround is changing the order
set_and_start_ev_signal_handlers
create_thread_pool
but I doubt that behaviour is desired.
Example program is attached.
MfG
Markus
/* gcc `pkg-config --libs --cflags glib-2.0` `pkg-config --libs --cflags gthread-2.0` -Wl,-rpath=/opt/dionaea/lib -lev -L/opt/dionaea/lib -I/opt/dionaea/include/ -o signalev signalev.c */
#include <ev.h>
#include <stdio.h>
#include <glib.h>
static void thread_fn(gpointer a, gpointer b)
{
}
static void sigint_cb (struct ev_loop *loop, ev_signal *w, int revents)
{
printf("SIGINT\n");
ev_unloop (loop, EVUNLOOP_ALL);
}
int main (void)
{
struct ev_loop *loop = ev_default_loop (0);
if ( !g_thread_supported () )
g_thread_init (NULL);
GError *thread_error = NULL;
GThreadPool *pool = g_thread_pool_new(thread_fn, NULL, 2, TRUE, &thread_error);
ev_signal signal_watcher;
ev_signal_init (&signal_watcher, sigint_cb, SIGINT);
ev_signal_start (loop, &signal_watcher);
ev_loop (loop, 0);
return 0;
}
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev