FS-3724 2 ways to fix after updating to this version, 1) run set_zombie_exec in the dp; 2) use system_on_fax_success/system_on_fax_failure vars with explicit name of your command

This commit is contained in:
Anthony Minessale
2011-11-28 16:45:59 -06:00
parent ead7c770bd
commit 12f2bdf66a
3 changed files with 30 additions and 3 deletions

View File

@@ -2408,6 +2408,7 @@ static int max_open(void)
static int switch_system_fork(const char *cmd, switch_bool_t wait)
{
int pid;
char *dcmd = strdup(cmd);
switch_core_set_signal_handlers();
@@ -2417,6 +2418,7 @@ static int switch_system_fork(const char *cmd, switch_bool_t wait)
if (wait) {
waitpid(pid, NULL, 0);
}
free(dcmd);
} else {
int open_max = max_open();
int i;
@@ -2426,7 +2428,8 @@ static int switch_system_fork(const char *cmd, switch_bool_t wait)
}
set_low_priority();
i = system(cmd);
i = system(dcmd);
free(dcmd);
exit(0);
}