int audio[2];
int x;
int res;
- sigset_t signal_set;
if (!strncasecmp(script, "agi://", 6))
return launch_netscript(script, argv, fds, efd, opid);
close(STDERR_FILENO + 1);
}
- /* unblock important signal handlers */
- if (sigfillset(&signal_set) || pthread_sigmask(SIG_UNBLOCK, &signal_set, NULL)) {
- ast_log(LOG_WARNING, "unable to unblock signals for AGI script: %s\n", strerror(errno));
- exit(1);
- }
-
/* Close everything but stdin/out/error */
for (x=STDERR_FILENO + 2;x<1024;x++)
close(x);
}
}
/* Notify process */
- if (pid > -1) {
- if (kill(pid, SIGHUP))
- ast_log(LOG_WARNING, "unable to send SIGHUP to AGI process %d: %s\n", pid, strerror(errno));
- }
+ if (pid > -1)
+ kill(pid, SIGHUP);
fclose(readf);
return returnstatus;
}