Fix X-PREPROCESS exec to wait pid
This commit is contained in:
parent
135bac5b6d
commit
dae2cb4aac
|
@ -56,6 +56,7 @@
|
|||
|
||||
#include <switch.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/wait.h>
|
||||
#include <switch_private.h>
|
||||
#include <glob.h>
|
||||
#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]);
|
||||
waitpid(pid, NULL, 0);
|
||||
} else { /* child */
|
||||
close(fds[0]);
|
||||
dup2(fds[1], STDOUT_FILENO);
|
||||
|
|
Loading…
Reference in New Issue