Module: kamailio
Branch: master
Commit: ba992b122eec30c5022d4c3e77af4e2f6eb0752a
URL:
https://github.com/kamailio/kamailio/commit/ba992b122eec30c5022d4c3e77af4e2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-10T08:24:21+01:00
app_python3: skip execution of child_init() for rank PROC_INIT
- this is a particular execution in main process after all modules were
initialized, not in a forked child process
---
Modified: src/modules/app_python3/app_python_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ba992b122eec30c5022d4c3e77af4e2…
Patch:
https://github.com/kamailio/kamailio/commit/ba992b122eec30c5022d4c3e77af4e2…
---
diff --git a/src/modules/app_python3/app_python_mod.c
b/src/modules/app_python3/app_python_mod.c
index c6f1098e60..180bb74230 100644
--- a/src/modules/app_python3/app_python_mod.c
+++ b/src/modules/app_python3/app_python_mod.c
@@ -174,6 +174,9 @@ static int mod_init(void)
*/
static int child_init(int rank)
{
+ if(rank==PROC_INIT) {
+ return 0;
+ }
_apy_process_rank = rank;
PyOS_AfterFork();
return apy_init_script(rank);