### Description
I am currently implementing a dynamic forwarding server in Kamailio. As a logic consequence, I wanted to name it "forward.ng-voice.com" and I added it as an Alias:
alias=forward.ng-voice.com
#### Reproduction
Add any Alias with the "forward" in it's domain-name (e.g. "ims.forward.ng-voice.com" fails too).
#### Log Messages
```
0(20620) CRITICAL: <core> [core/cfg.y:3427]: yyerror_at(): parse error in config file forward.cfg, line 11, column 7-13: syntax error
0(20620) CRITICAL: <core> [core/cfg.y:3427]: yyerror_at(): parse error in config file forward.cfg, line 11, column 7-13: hostname expected
0(20620) CRITICAL: <core> [core/cfg.y:3430]: yyerror_at(): parse error in config file forward.cfg, line 11, column 14:
```
### Possible Solutions
Use a different Domain-Name like "fwd" or "forwarder".
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.0-dev5 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
```
* **Operating System**:
Debian 8
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1207
Module: kamailio
Branch: 4.4
Commit: 78684f2bba3d408e60eb8450bf915ebe92c8f8d1
URL: https://github.com/kamailio/kamailio/commit/78684f2bba3d408e60eb8450bf915eb…
Author: codyherzog <cherzog(a)intouchhealth.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-08T14:16:15+02:00
core: Don't terminate on harmless SIGCHLD.
If it appears that no child process has stopped, then do not terminate
on SIGCHLD. Certain modules like app_python can run external scripts
which cause child processes to be started and stopped. That can result
in SIGCHLD being received even though there is no real problem.
Therefore, we do not terminate Kamailio unless we can find the child
process which has stopped.
(cherry picked from commit 1c5e166001306a1a9d9d8412f0a54910093109cb)
(cherry picked from commit f508665fdbfe63cd03989dca067e6c725c8344d0)
---
Modified: main.c
---
Diff: https://github.com/kamailio/kamailio/commit/78684f2bba3d408e60eb8450bf915eb…
Patch: https://github.com/kamailio/kamailio/commit/78684f2bba3d408e60eb8450bf915eb…
---
diff --git a/main.c b/main.c
index b6f68df1a4..2b739ac805 100644
--- a/main.c
+++ b/main.c
@@ -675,6 +675,7 @@ void handle_sigs(void)
{
pid_t chld;
int chld_status;
+ int any_chld_stopped;
int memlog;
switch(sig_flag){
@@ -730,7 +731,9 @@ void handle_sigs(void)
break;
case SIGCHLD:
+ any_chld_stopped=0;
while ((chld=waitpid( -1, &chld_status, WNOHANG ))>0) {
+ any_chld_stopped=1;
if (WIFEXITED(chld_status))
LM_ALERT("child process %ld exited normally,"
" status=%d\n", (long)chld,
@@ -747,6 +750,16 @@ void handle_sigs(void)
" signal %d\n", (long)chld,
WSTOPSIG(chld_status));
}
+
+ /* If it appears that no child process has stopped, then do not terminate on SIGCHLD.
+ Certain modules like app_python can run external scripts which cause child processes to be started and
+ stopped. That can result in SIGCHLD being received here even though there is no real problem. Therefore,
+ we do not terminate Kamailio unless we can find the child process which has stopped. */
+ if (!any_chld_stopped) {
+ LM_INFO("SIGCHLD received, but no child has stopped, ignoring it\n");
+ break;
+ }
+
#ifndef STOP_JIRIS_CHANGES
if (dont_fork) {
LM_INFO("dont_fork turned on, living on\n");