diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-12 22:58:49 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-12-12 22:58:49 +0000 |
commit | 41df2e668668137091861464cabe91cf110f4302 (patch) | |
tree | 921cb941ba1a59df6cc1650b935d249fa0b73f84 /apps/app_festival.c | |
parent | 476ed07a1111e6172eb4f860ad239d3ef7bb5f49 (diff) |
manual update, since automerge is not running at this time
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@48421 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_festival.c')
-rw-r--r-- | apps/app_festival.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/app_festival.c b/apps/app_festival.c index 7c69dc8b9..33f54aaf3 100644 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -127,19 +127,26 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) { #ifdef __PPC__ char c; #endif + sigset_t fullset, oldset; + + sigfillset(&fullset); + pthread_sigmask(SIG_BLOCK, &fullset, &oldset); res = fork(); if (res < 0) ast_log(LOG_WARNING, "Fork failed\n"); - if (res) + if (res) { + pthread_sigmask(SIG_SETMASK, &oldset, NULL); return res; + } for (x=0;x<256;x++) { if (x != fd) close(x); } if (option_highpriority) ast_set_priority(0); - + signal(SIGPIPE, SIG_DFL); + pthread_sigmask(SIG_UNBLOCK, &fullset, NULL); /*IAS */ #ifdef __PPC__ for( x=0; x<length; x+=2) |