Skip to content

Commit

Permalink
Re-init events after fork when daemonizing.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidk committed Mar 17, 2011
1 parent 7e5e346 commit 07daf02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ server_start(struct server *s) {

if(s->cfg->daemonize) {
server_daemonize();

/* sometimes event mech gets lost on fork */
if(event_reinit(s->base) != 0) {
fprintf(stderr, "Error: event_reinit failed after fork");
}
}

/* ignore sigpipe */
Expand Down

0 comments on commit 07daf02

Please sign in to comment.