The reason being if the module unloads while scripts are still running you&#39;re going to be almost guaranteed a segmentation fault - a well meaning admin running a simple command could crash the entire server dropping all calls.<div>

<br></div><div>-Steve</div><div><br></div><div><br><div><br><div class="gmail_quote">On 22 January 2013 15:53, Seven Du <span dir="ltr">&lt;<a href="mailto:dujinfang@gmail.com" target="_blank">dujinfang@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>mod_lua was reloadable  but when I found that long-running scripts cannot be  easily stopped the developers changed it to un-reloadable.</div><div><br></div><div>I&#39;d find some way to start/stop long-running scripts and I&#39;d seen some implementations based on my example:</div>

<div><br></div><div><a href="http://fisheye.freeswitch.org/browse/freeswitch-contrib.git/seven/lua/gateway_report.lua?hb=true" target="_blank">http://fisheye.freeswitch.org/browse/freeswitch-contrib.git/seven/lua/gateway_report.lua?hb=true</a></div>

<div><div><br></div><div><br></div><div>There&#39;s also a blog page in Chinese explaining this: <a href="http://www.freeswitch.org.cn/2010/03/15/zai-freeswitchzhong-zhi-xing-chang-qi-yun-xing-de-qian-ru-shi-jiao-ben-luayu-yan-li-zi.html" target="_blank">http://www.freeswitch.org.cn/2010/03/15/zai-freeswitchzhong-zhi-xing-chang-qi-yun-xing-de-qian-ru-shi-jiao-ben-luayu-yan-li-zi.html</a></div>

<div><br></div><div><br></div><div>Hope this helps.</div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5">
                 
                <p style="color:#a0a0a8">On Tuesday, January 22, 2013 at 3:40 PM, Mimiko wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
                    <span><div><div><div>On 21.01.2013 23:47, William King wrote:</div><blockquote type="cite"><div><div>Interesting. A mod_lua api that would list the currently running lua</div><div>scripts with an id that could be used to kill off individual scripts.</div>

</div></blockquote><div><br></div><div>Lua scripts, started with FS on start-up must not be killed, but updated </div><div>when changing code of script. A killing command for a lua script is ok </div><div>for scripts that got in loop/.</div>

<div><br></div><div>-- </div><div>Mimiko desu.</div><div><br></div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></div>

<div><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a></div>

<div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a></div>

<div><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-users mailing list</div><div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></div>

<div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></div>

<div><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>
            </div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>