Bug 6864 - drop realtime priority on ALL external processes

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-05-01 20:44:24 +00:00
parent 822ea9615a
commit 00c0af845d
9 changed files with 29 additions and 0 deletions

View File

@@ -96,6 +96,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 (option_highpriority)
ast_set_priority(0);
/* Close other file descriptors */
for (x=STDERR_FILENO + 1;x<1024;x++)
close(x);