diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 19:01:17 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 19:01:17 +0000 |
commit | 257ff7d1da5c474fe4c8f541f8f4130c201dffaf (patch) | |
tree | aeba5ca19fe664ff73d3fe4f585fcaa1456bd260 /asterisk.c | |
parent | 1e7f09ff59a5e6a34b3cfde4af49856847775115 (diff) |
This explicit poll is only needed on mac. In fact, it breaks some systems
such as some versions of Fedora, causing 'asterisk -rx' to never exit. This
has been tested on systems showing the asterisk -rx problem, as well as other
unaffected versions of linux, mac osx 10.4, and FreeBSD 6.
(issue #7071)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@28754 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r-- | asterisk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c index 334d322df..c0605f036 100644 --- a/asterisk.c +++ b/asterisk.c @@ -1803,13 +1803,17 @@ static void ast_remotecontrol(char * data) if (option_exec && data) { /* hack to print output then exit if asterisk -rx is used */ char tempchar; +#ifdef __Darwin__ struct pollfd fds[0]; fds[0].fd = ast_consock; fds[0].events = POLLIN; fds[0].revents = 0; - while(poll(fds, 1, 100) > 0) { + while (poll(fds, 1, 100) > 0) { ast_el_read_char(el, &tempchar); } +#else + while (!ast_el_read_char(el, &tempchar)); +#endif return; } for(;;) { |