[Freeswitch-users] [freeswitch] <defunct> when using cmd="exec" in freeswitch.xml

Mitja Thomas mitja.thomas1 at ewetel.de
Thu Mar 10 13:19:27 MSK 2011


Hi there,

we tried to set up the FreeSWITCH and other Applications, so that we can 
configure them easier and more centralised.
Thus we defined some Environment Variables (using CentOS) which hold 
often used Configuration Parameter like MySQL IP or FS Event Socket IP.
We tried to integrate these Env Variables into the FS conf files by 
executing a shell Skript in freeswitch.xml via cmd="exec" which prepares 
an conf file which we include into freeswitch.xml:

<X-PRE-PROCESS cmd="exec" data="sh conf/make_my_vars.sh"/>
<X-PRE-PROCESS cmd="include" data="my_vars.xml"/>

This works as expected and the pre defined variables in my_vars can be 
accessed from the other config Files, except that when we start our 
FreeSWITCH  a zombie child process is spawned.

# ps -eaf | grep free
ippbx    22191 22190  4 09:41 pts/1    00:00:01 
/opt/app/voip/ippbx/bin/freeswitch -waste -nonat -hp
ippbx    22197 22191  0 09:41 pts/1    00:00:00 [freeswitch] <defunct>

What I wanna know is: Is this a FS missbehaviour or do we use this in a 
wrong way?

make_my_vars.sh:
F="conf/my_vars.xml"
echo "<!-- Auto generated file for getting *NIX evironment variables 
-->" > $F
echo "<include>" >> $F

fs_ip=`printenv MY_FS_IP`
if test -n "$fs_ip"
then
         echo '<X-PRE-PROCESS cmd="set" data="my_fs_ip='$fs_ip'"/>' >> $F
fi
...
echo "</include>" >> $F

my_vars.xml (after FS startup):
<!-- Auto generated file for getting *NIX evironment variables -->
<include>
<X-PRE-PROCESS cmd="set" data="my_fs_ip=***.***.***.***"/>
...
</include>

Regards
Mitja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110310/ca5d7c43/attachment.html 


More information about the FreeSWITCH-users mailing list