[Freeswitch-users] Defunct process in ESL testserver example

MohammedShehzad pmhshz at gmail.com
Tue Jan 12 20:56:44 PST 2010


Thanks Anthony,

I added the below line before esl_listen to ignore the sigchild, and it
resolved the problem:
signal(SIGCHLD, SIG_IGN);
esl_listen(ip, port, mycallback);

-MohammedShehzad

On Tue, Jan 12, 2010 at 10:04 PM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:

> It's forking process code.
> you need to ignore sigchld or create a sig handler for sigchld and use the
> wait syscall to reap the process.
>
>
> On Tue, Jan 12, 2010 at 9:22 AM, MohammedShehzad <pmhshz at gmail.com> wrote:
>
>> Hello everybody,
>>
>> I am creating a C program of ESL outbound for call processing.
>> I am using testserver.c example, and till now it seems fine.
>>
>> But i noticed that every call testserver process, a new process is being
>> created which I can see in Linux system with below command:
>> For example, when I make two calls and even after hangup, I saw three
>> process like below:
>> ps -A | grep testserver
>>  9345 pts/2    00:00:00 testserver
>>  9350 pts/2    00:00:00 testserver
>>  9357 pts/2    00:00:00 testserver
>>
>> This get increased for every call i make.
>>
>> I did some workout and placed below two lines (close & exit) at the end of
>> mycallback function, (as I found them on ivrd.c file):
>>
>>     esl_disconnect(&handle);
>>     close(client_sock);
>>     exit(0);
>> }
>> But after that the process becomes defunct/zombie
>>
>>  9440 pts/2    00:00:00 conflisten
>>  9442 pts/2    00:00:00 conflisten <defunct>
>>  9452 pts/2    00:00:00 conflisten <defunct>
>>
>>
>> Will anybody please suggest me how can I eliminate this process, which
>> remains in memory even after call hangup?
>>
>> Thanks for any response.
>> MohammedShehzad
>>
>>
>>
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
> iax:guest at conference.freeswitch.org/888
> googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:+19193869900
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100113/6c4cbdbd/attachment-0002.html 


More information about the FreeSWITCH-users mailing list