it&#39;s just a necessary thing to do when forking a child process.<div>so its fine that way if it&#39;s working.</div><div><br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 2:49 PM, Ejay Greeves <span dir="ltr">&lt;<a href="mailto:ejay.greeves@yahoo.com">ejay.greeves@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">I have added the second suggestion you made, so far I done it this way because it was easier to get the result. Is it correct how I have done it and if so does it take less resources the other way you suggest because at this stage I don&#39;t yet that<div class="im">
<br><br><br>loop do<div><span style="white-space:pre-wrap">        </span>event =
 con.recvEvent</div></div>       Signal.trap(&#39;CHLD&#39;, &#39;IGNORE&#39;)<div class="im"><div><span style="white-space:pre-wrap">        </span>pid = fork do<span style="white-space:pre-wrap"><br><br>        </span>end</div><div>
<br></div><div><span style="white-space:pre-wrap">        </span>Process.detach(pid)</div><div><span style="white-space:pre-wrap">        </span></div><div>end</div><br><br><br></div>--- On <b>Tue, 29/3/11, Anthony Minessale <i>&lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;</i></b> wrote:<br>
<blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px"><br>From: Anthony Minessale &lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;<br>
Subject: Re: [Freeswitch-users] recvEvent causes zombies process<br>To: &quot;FreeSWITCH Users Help&quot; &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
Date: Tuesday, 29 March, 2011, 15:52<div><div></div><div class="h5"><br><br><div>you are calling fork every time you receive an event.<div>you need to exit the process from the child and
 reap or ignore it on the parent.</div><div><br><br><div>On Tue, Mar 29, 2011 at 6:09 AM, Ejay Greeves <span dir="ltr">&lt;<a rel="nofollow" href="http://mc/compose?to=ejay.greeves@yahoo.com" target="_blank">ejay.greeves@yahoo.com</a>&gt;</span> wrote:<br>

<blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-size-adjust:inherit;font-stretch:inherit" valign="top">
<div><table border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td style="font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;font-size-adjust:inherit;font-stretch:inherit;font-family:arial;font-size:10pt"><div>I am wanting to code an inbound event program.</div>

<div><br></div><div>In order to see why I am getting zombie processes I stripped out all my code and used the minimum skeletcon code to do a test.</div><div><br></div><div>con = ESL::ESLconnection.new(&#39;127.0.0.1&#39;, &#39;8021&#39;, &#39;ClueCon&#39;)</div>

<div>con.events(&quot;plain&quot;, &quot;CHANNEL_HANGUP_COMPLETE&quot;)</div><div><br></div><div>loop do</div><div><span style="white-space:pre-wrap">        </span>event =
 con.recvEvent</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>pid = fork do</div><div><span style="white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap"><br>
<br>        </span>end</div><div><br></div><div><span style="white-space:pre-wrap">        </span>Process.detach(pid)</div><div><span style="white-space:pre-wrap">        </span></div><div>end</div><div><br></div><div><br></div><div>This code does nothing but wait for an incoming event, creates an fork then detach however it still produces a defunct process.</div>

<div><br></div><div>I think con.recvEvent is the cause?</div></td></tr></tbody></table></div></td></tr></tbody></table><br>



      <br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a rel="nofollow" href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a rel="nofollow" href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>

Twitter: <a rel="nofollow" href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a rel="nofollow" href="http://mc/compose?to=MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a rel="nofollow" href="http://mc/compose?to=PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a rel="nofollow" href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a rel="nofollow" href="http://mc/compose?to=sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a rel="nofollow" href="http://mc/compose?to=googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>
</div><br></div></div>-----Inline Attachment Follows-----<div class="im"><br><br><div>_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></div></div></blockquote></td></tr></tbody></table><br>



      <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><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>