From f246b9fc64ea8843f419947045574edb2681f9a2 Mon Sep 17 00:00:00 2001 From: Matt O'Gorman <mogorman@digium.com> Date: Wed, 1 Feb 2006 20:40:45 +0000 Subject: [PATCH] reports why an agi script errors out on opening file git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9059 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_agi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/res_agi.c b/res/res_agi.c index d7f0574af1..99f6a1b328 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -309,7 +309,8 @@ static int launch_script(char *script, char *argv[], int *fds, int *efd, int *op /* Execute script */ execv(script, argv); /* Can't use ast_log since FD's are closed */ - fprintf(stderr, "Failed to execute '%s': %s\n", script, strerror(errno)); + fprintf(stdout, "verbose \"Failed to execute '%s': %s\" 2\n", script, strerror(errno)); + fflush(stdout); exit(1); } if (option_verbose > 2)