diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-06 20:04:17 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-06 20:04:17 +0000 |
commit | 333bf20598192f139217babdb6959ab67222502e (patch) | |
tree | 408830a9e52884969d156d1b8dc27b66c5b917fd /res | |
parent | ca9550cdf8771c0f66ab1b6953f4dcb437c68f4c (diff) |
Merged revisions 42148 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r42148 | file | 2006-09-06 16:02:59 -0400 (Wed, 06 Sep 2006) | 2 lines
Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42149 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_agi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index bf51946f9..edcda4e60 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2023,7 +2023,8 @@ static int agi_exec_full(struct ast_channel *chan, void *data, int enhanced, int /* If the fork'd process returns non-zero, set AGISTATUS to FAILURE */ if (res == AGI_RESULT_SUCCESS && status) res = AGI_RESULT_FAILURE; - close(fds[1]); + if (fds[1] != fds[0]) + close(fds[1]); if (efd > -1) close(efd); ast_unreplace_sigchld(); |