mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 02:22:56 +00:00
Fix X-PREPROCESS exec to wait pid
This commit is contained in:
parent
135bac5b6d
commit
dae2cb4aac
@ -56,6 +56,7 @@
|
|||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <switch_private.h>
|
#include <switch_private.h>
|
||||||
#include <glob.h>
|
#include <glob.h>
|
||||||
#else /* we're on windoze :( */
|
#else /* we're on windoze :( */
|
||||||
@ -1245,6 +1246,7 @@ static int preprocess_exec(const char *cwd, const char *command, int write_fd, i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(fds[0]);
|
close(fds[0]);
|
||||||
|
waitpid(pid, NULL, 0);
|
||||||
} else { /* child */
|
} else { /* child */
|
||||||
close(fds[0]);
|
close(fds[0]);
|
||||||
dup2(fds[1], STDOUT_FILENO);
|
dup2(fds[1], STDOUT_FILENO);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user