From 41df2e668668137091861464cabe91cf110f4302 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 12 Dec 2006 22:58:49 +0000 Subject: 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 --- apps/app_festival.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apps/app_festival.c') 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