[Asterisk-Dev] AGI script looping not killed by Asterisk

Areski areski at e-group.org
Mon Oct 13 07:33:33 MST 2003


Hi all,


I did a small AGI script looping all the time (see the source below).
But Asterisk don't stop the process when I hangup...
I launch asterisk in this way : /usr/sbin/asterisk -vvv -c

And looking to the source app_agi.c, it's seem that * should stop this
process with a SIGHUP...


Someone have an idea, why that doesn't work in the good way ?!?

Cheers,
Areski

 
int main()
{                                                                                        	char line[80];
       /* use line buffering */
        setlinebuf(stdout);       
	setlinebuf(stderr);                                                                               
        /* read and ignore AGI environment */
        while (1) {
                fgets(line,80,stdin);
                if (strlen(line) <= 1) break;
                }
    for (;;){
                 
           printf("STREAM FILE GB_5 \"\"\n");
           fgets(line,80,stdin);
           fputs(line,stderr);
 
           printf("SAY DIGITS 154642 \"\"\n");
           fgets(line,80,stdin);
           fputs(line,stderr);
           sleep(2);
    }
 
   return 0;
}







More information about the asterisk-dev mailing list