<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Micheal,<br>
<br>
yeah I think your workaround will work fine and Ill change it that
way. But this issue might still be a missbehaviour. Either by fs in
which case I think it might be an interesting information for the
Developers OR a wrong usage by me in which case this is an
interesting information for me :)<br>
<br>
Thanks,<br>
Mitja<br>
<blockquote
cite="mid:%3CAANLkTin7EUJpz4=9gxp3sTXykjybH5B4Uer7noD+Bgct@mail.gmail.com%3E"
type="cite">IIRC, 'fork' creates a child PID that stays around and
waits for the parent PID to die. (Don't quote me on that - wait
for an expert to chime in.)
<div><br>
An alternative method would be to have a FS start script that
launches your make_my_vars.sh script and then launches FS with
the appropriate cmd line args. You could then drop the 'exec'
cmd and then just keep the include cmd. </div>
<div><br>
</div>
<div>-MC<br>
<br>
<div class="gmail_quote">On Thu, Mar 10, 2011 at 2:19 AM, Mitja
Thomas <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mitja.thomas1@ewetel.de">mitja.thomas1@ewetel.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Hi there,<br>
<br>
we tried to set up the FreeSWITCH and other Applications,
so that we can configure them easier and more centralised.<br>
Thus we defined some Environment Variables (using CentOS)
which hold often used Configuration Parameter like MySQL
IP or FS Event Socket IP.<br>
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:<br>
<br>
<small><small> <X-PRE-PROCESS cmd="exec" data="sh
conf/make_my_vars.sh"/><br>
<X-PRE-PROCESS cmd="include"
data="my_vars.xml"/></small></small><br>
<br>
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. <br>
<br>
<small><small># ps -eaf | grep free<br>
ippbx 22191 22190 4 09:41 pts/1 00:00:01
/opt/app/voip/ippbx/bin/freeswitch -waste -nonat -hp<br>
ippbx 22197 22191 0 09:41 pts/1 00:00:00
[freeswitch] <defunct></small></small><br>
<br>
What I wanna know is: Is this a FS missbehaviour or do we
use this in a wrong way?<br>
<br>
make_my_vars.sh:<br>
<small><small>F="conf/my_vars.xml"<br>
echo "<!-- Auto generated file for getting *NIX
evironment variables -->" > $F<br>
echo "<include>" >> $F<br>
<br>
fs_ip=`printenv MY_FS_IP`<br>
if test -n "$fs_ip"<br>
then<br>
echo '<X-PRE-PROCESS cmd="set"
data="my_fs_ip='$fs_ip'"/>' >> $F<br>
fi<br>
...<br>
echo "</include>" >> $F</small></small><br>
<br>
my_vars.xml (after FS startup):<br>
<small><small><!-- Auto generated file for getting *NIX
evironment variables --><br>
<include><br>
<X-PRE-PROCESS cmd="set"
data="my_fs_ip=***.***.***.***"/><br>
...<br>
</include></small></small><br>
<br>
Regards<br>
Mitja<br>
</div>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>