Index: asterisk.c =================================================================== --- asterisk.c (revision 25321) +++ asterisk.c (working copy) @@ -1803,13 +1803,7 @@ if (option_exec && data) { /* hack to print output then exit if asterisk -rx is used */ char tempchar; - struct pollfd fds[0]; - fds[0].fd = ast_consock; - fds[0].events = POLLIN; - fds[0].revents = 0; - while(poll(fds, 1, 100) > 0) { - ast_el_read_char(el, &tempchar); - } + while (!ast_el_read_char(el, &tempchar)); return; } for(;;) {