[Asterisk-Users] AGI and broken pipe

Paulo Mannheimer paulohm at instant.com.br
Thu Dec 18 07:48:59 MST 2003


Hi All,

I was able to track down what I believe is a bug when using AGI
services. This bug may crash your system if your extensions.conf script
is intensive in using AGI services. Depending on your system's ulimit, *
keeps opening files until it reaches the system limit and then stops
responding.

Function app_agi/launch_script seems to leave an open and unused file.
Can someone confirm this? Below is a patch that solves the problem.

Index: asterisk/apps/app_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_agi.c,v
retrieving revision 1.22
diff -u -r1.22 app_agi.c
--- asterisk/apps/app_agi.c     5 Nov 2003 23:43:31 -0000       1.22
+++ asterisk/apps/app_agi.c     18 Dec 2003 13:48:38 -0000
@@ -167,6 +167,10 @@
        /* close what we're not using in the parent */
        close(toast[1]);
        close(fromast[0]);
+
+       // [PHM 12/18/03]
+       close(audio[0])
+
        *opid = pid;
        return 0;






More information about the asterisk-users mailing list