Skip to content
Snippets Groups Projects
Commit 3a9640b2 authored by Nick Zavaritsky's avatar Nick Zavaritsky
Browse files

gh-517: touch libev event loop after fork for proper reinit

parent 76086820
No related branches found
No related tags found
No related merge requests found
...@@ -363,6 +363,12 @@ background() ...@@ -363,6 +363,12 @@ background()
if (setsid() == -1) if (setsid() == -1)
goto error; goto error;
/*
* tell libev we've just forked, this is necessary to re-initialize
* kqueue on FreeBSD.
*/
ev_loop_fork(cord()->loop);
/* /*
* reinit signals after fork, because fork() implicitly calls * reinit signals after fork, because fork() implicitly calls
* signal_reset() via pthread_atfork() hook installed by signal_init(). * signal_reset() via pthread_atfork() hook installed by signal_init().
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment