mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
revert SIGHUP patch to restore original behavior for 1.0 (bug #4854)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -203,7 +203,6 @@ static int launch_script(char *script, char *argv[], int *fds, int *efd, int *op
|
|||||||
int audio[2];
|
int audio[2];
|
||||||
int x;
|
int x;
|
||||||
int res;
|
int res;
|
||||||
sigset_t signal_set;
|
|
||||||
|
|
||||||
if (!strncasecmp(script, "agi://", 6))
|
if (!strncasecmp(script, "agi://", 6))
|
||||||
return launch_netscript(script, argv, fds, efd, opid);
|
return launch_netscript(script, argv, fds, efd, opid);
|
||||||
@@ -260,12 +259,6 @@ static int launch_script(char *script, char *argv[], int *fds, int *efd, int *op
|
|||||||
close(STDERR_FILENO + 1);
|
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 */
|
/* Close everything but stdin/out/error */
|
||||||
for (x=STDERR_FILENO + 2;x<1024;x++)
|
for (x=STDERR_FILENO + 2;x<1024;x++)
|
||||||
close(x);
|
close(x);
|
||||||
@@ -1551,10 +1544,8 @@ static int run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid, i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Notify process */
|
/* Notify process */
|
||||||
if (pid > -1) {
|
if (pid > -1)
|
||||||
if (kill(pid, SIGHUP))
|
kill(pid, SIGHUP);
|
||||||
ast_log(LOG_WARNING, "unable to send SIGHUP to AGI process %d: %s\n", pid, strerror(errno));
|
|
||||||
}
|
|
||||||
fclose(readf);
|
fclose(readf);
|
||||||
return returnstatus;
|
return returnstatus;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user