app_python3 needs to call `PyOS_AfterFork_Child()`/`PyOS_AfterFork()` in real child processes.
We need a test for this: rank > 0 may not be sufficient due to non-forking mode. This POC uses getpid().
- [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [X] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [ ] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail --> @miconda @henningw : this PR is for discussion only: in KEMI Python there is an interpreter function that needs to be called after `fork()` in real child processes. I realise that `rank > 0` may not be a completely correct test as kamailio has a non-forking mode. Your comments would be appreciated.
This POC uses `getpid()` to detect a &ldquo;real&rdquo; child process. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3139
-- Commit Summary --
* WIP app_python3: need a test for a real child process
-- File Changes --
M src/modules/app_python3/app_python3_mod.c (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3139.patch https://github.com/kamailio/kamailio/pull/3139.diff