@ -1228,6 +1228,9 @@ static int run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid)
structast_frame*f;
charbuf[2048];
FILE*readf;
//how many times we'll retry if ast_waitfor_nandfs will return without either channel or file descriptor in case select is interrupted by a system call (EINTR)
intretry=RETRY;
if(!(readf=fdopen(agi->ctrl,"r"))){
ast_log(LOG_WARNING,"Unable to fdopen file descriptor\n");
kill(pid,SIGHUP);
@ -1239,6 +1242,7 @@ static int run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid)