Skip to content

Commit

Permalink
kazoo: init cfg framework in child processes
Browse files Browse the repository at this point in the history
fixes crashing since commit c7bec33
(cherry picked from commit d63869c)
  • Loading branch information
lazedo committed Aug 6, 2016
1 parent ad531a9 commit 105a17d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/kazoo/kazoo.c
Expand Up @@ -324,20 +324,23 @@ static int mod_child_init(int rank)
if (pid<0)
return -1; /* error */
if(pid==0){
if (cfg_child_init()) return -1;
kz_amqp_consumer_proc(1);
}
else {
pid=fork_process(1, "AMQP Publisher", 1);
if (pid<0)
return -1; /* error */
if(pid==0){
if (cfg_child_init()) return -1;
kz_amqp_publisher_proc(0);
}
else {
pid=fork_process(3, "AMQP Timer", 1);
if (pid<0)
return -1; /* error */
if(pid==0){
if (cfg_child_init()) return -1;
kz_amqp_timeout_proc(2);
}
else {
Expand All @@ -346,6 +349,7 @@ static int mod_child_init(int rank)
if (pid<0)
return -1; /* error */
if(pid==0){
if (cfg_child_init()) return -1;
mod_consumer_proc(i+3);
}
}
Expand Down

0 comments on commit 105a17d

Please sign in to comment.