Skip to content
Permalink
Browse files
Call pthread_atfork(..., ev_default_fork) only after the default even…
…t loop has been created.
  • Loading branch information
Brian Maher committed Apr 23, 2010
1 parent faf1967 commit e9565f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
@@ -81,6 +81,9 @@ static struct ev_loop** check_loop_and_init(lua_State *L, int loop_i) {
" is causing it to select a bad backend?");
}
register_obj(L, loop_i, *loop_r);

/* TODO: Only enable this if linked with pthread: */
pthread_atfork(0, 0, ev_default_fork);
}
return loop_r;
}
File renamed without changes.
@@ -27,9 +27,6 @@ LUALIB_API int luaopen_ev(lua_State *L) {
assert(ev_version_major() == EV_VERSION_MAJOR &&
ev_version_minor() >= EV_VERSION_MINOR);

/* TODO: Only enable this if linked with pthread: */
pthread_atfork(0, 0, ev_default_fork);

create_obj_registry(L);

lua_createtable(L, 0, 10);

0 comments on commit e9565f9

Please sign in to comment.