diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-05 03:20:55 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-05 03:20:55 +0000 |
commit | cfc2b33d30b91a6f5d7eb38268711c0d9480ac73 (patch) | |
tree | 43bbc5fb738257b338682fa55d5417d784661ea2 /res | |
parent | 3663043b97e7b14b57076a3ab80e03eeb482474b (diff) |
Make mpg123 behave more nicely
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5142 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-x | res/res_musiconhold.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index f948e206f..7e386c795 100755 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -945,11 +945,11 @@ static void ast_moh_destroy(void) while (moh) { if (moh->pid) { ast_log(LOG_DEBUG, "killing %d!\n", moh->pid); - stime = time(NULL) + 5; + stime = time(NULL) + 2; pid = moh->pid; moh->pid = 0; kill(pid, SIGKILL); - while ((bytes = read(moh->srcfd, buff, 8192)) && time(NULL) < stime) { + while ((ast_wait_for_input(moh->srcfd, 100) > -1) && (bytes = read(moh->srcfd, buff, 8192)) && time(NULL) < stime) { tbytes = tbytes + bytes; } ast_log(LOG_DEBUG, "mpg123 pid %d and child died after %d bytes read\n", pid, tbytes); |