Module: kamailio
Branch: master
Commit: 508e59090960322d1709b7e56a41300d0e948600
URL: 
https://github.com/kamailio/kamailio/commit/508e59090960322d1709b7e56a41300d0e948600

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-07-08T11:53:07+02:00

cplc: update main process variable after the internal fork()

- probably module should be updated to use internal API fork_process()

---

Modified: src/modules/cplc/cpl_nonsig.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/508e59090960322d1709b7e56a41300d0e948600.diff
Patch: 
https://github.com/kamailio/kamailio/commit/508e59090960322d1709b7e56a41300d0e948600.patch

---

diff --git a/src/modules/cplc/cpl_nonsig.c b/src/modules/cplc/cpl_nonsig.c
index b0cb8d87bfe..515e8fb7df1 100644
--- a/src/modules/cplc/cpl_nonsig.c
+++ b/src/modules/cplc/cpl_nonsig.c
@@ -152,6 +152,7 @@ static inline void send_mail(struct cpl_cmd *cmd)
                LM_ERR("fork failed: %s\n", strerror(errno));
                goto error;
        } else if(pid == 0) {
+               _ksr_is_main = 0;
                /* child -> close all descriptors excepting pfd[0] */
                /* 32 is the maximum number of inherited open file descriptors 
*/
                for(i = 3; i < 32; i++)

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to