diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-01 21:48:30 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-01 21:48:30 +0000 |
commit | 11ac93dfa1fcc9d5ae727cb89aa24827206245fb (patch) | |
tree | 317d5d5181b5da608cf7e45510e280defad7fc74 /apps | |
parent | 8eb09360b12dee2551da13c354c247c75714d174 (diff) |
Merged revisions 24019 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r24019 | tilghman | 2006-05-01 15:44:24 -0500 (Mon, 01 May 2006) | 2 lines
Bug 6864 - drop realtime priority on ALL external processes
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_externalivr.c | 4 | ||||
-rw-r--r-- | apps/app_festival.c | 4 | ||||
-rw-r--r-- | apps/app_ices.c | 3 | ||||
-rw-r--r-- | apps/app_mp3.c | 3 | ||||
-rw-r--r-- | apps/app_nbscat.c | 4 | ||||
-rw-r--r-- | apps/app_zapras.c | 4 |
6 files changed, 22 insertions, 0 deletions
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index ef35637c9..7a9757ed1 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -50,6 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/linkedlists.h" #include "asterisk/app.h" #include "asterisk/utils.h" +#include "asterisk/options.h" static const char *app = "ExternalIVR"; @@ -316,6 +317,9 @@ static int app_exec(struct ast_channel *chan, void *data) /* child process */ int i; + if (ast_opt_high_priority) + ast_set_priority(0); + dup2(child_stdin[0], STDIN_FILENO); dup2(child_stdout[1], STDOUT_FILENO); dup2(child_stderr[1], STDERR_FILENO); diff --git a/apps/app_festival.c b/apps/app_festival.c index f06cbaef3..223aca571 100644 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -55,6 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/config.h" #include "asterisk/utils.h" #include "asterisk/lock.h" +#include "asterisk/options.h" #define FESTIVAL_CONFIG "festival.conf" @@ -140,6 +141,9 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) { if (x != fd) close(x); } + if (ast_opt_high_priority) + ast_set_priority(0); + /*IAS */ #ifdef __PPC__ for( x=0; x<length; x+=2) diff --git a/apps/app_ices.c b/apps/app_ices.c index 3a8130ab6..9558f021b 100644 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -46,6 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/translate.h" +#include "asterisk/options.h" #define ICES "/usr/bin/ices" #define LOCAL_ICES "/usr/local/bin/ices" @@ -70,6 +71,8 @@ static int icesencode(char *filename, int fd) ast_log(LOG_WARNING, "Fork failed\n"); if (res) return res; + if (ast_opt_high_priority) + ast_set_priority(0); dup2(fd, STDIN_FILENO); for (x=STDERR_FILENO + 1;x<256;x++) { if ((x != STDIN_FILENO) && (x != STDOUT_FILENO)) diff --git a/apps/app_mp3.c b/apps/app_mp3.c index bfb0eb9ad..b5a313807 100644 --- a/apps/app_mp3.c +++ b/apps/app_mp3.c @@ -45,6 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/translate.h" +#include "asterisk/options.h" #define LOCAL_MPG_123 "/usr/local/bin/mpg123" #define MPG_123 "/usr/bin/mpg123" @@ -71,6 +72,8 @@ static int mp3play(char *filename, int fd) ast_log(LOG_WARNING, "Fork failed\n"); if (res) return res; + if (ast_opt_high_priority) + ast_set_priority(0); dup2(fd, STDOUT_FILENO); for (x=0;x<256;x++) { if (x != STDOUT_FILENO) diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c index a557f2dfa..05fb4e442 100644 --- a/apps/app_nbscat.c +++ b/apps/app_nbscat.c @@ -46,6 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/translate.h" +#include "asterisk/options.h" #define LOCAL_NBSCAT "/usr/local/bin/nbscat8k" #define NBSCAT "/usr/bin/nbscat8k" @@ -75,6 +76,9 @@ static int NBScatplay(int fd) ast_log(LOG_WARNING, "Fork failed\n"); if (res) return res; + if (ast_opt_high_priority) + ast_set_priority(0); + dup2(fd, STDOUT_FILENO); for (x=0;x<256;x++) { if (x != STDOUT_FILENO) diff --git a/apps/app_zapras.c b/apps/app_zapras.c index c95f75238..d75d2ee7c 100644 --- a/apps/app_zapras.c +++ b/apps/app_zapras.c @@ -100,6 +100,10 @@ static pid_t spawn_ras(struct ast_channel *chan, char *args) /* Execute RAS on File handles */ dup2(chan->fds[0], STDIN_FILENO); + /* Drop high priority */ + if (ast_opt_high_priority) + ast_set_priority(0); + /* Close other file descriptors */ for (x=STDERR_FILENO + 1;x<1024;x++) close(x); |