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
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@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@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@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org