author | wenzelm |
Fri, 27 Apr 2012 19:31:03 +0200 | |
changeset 47796 | c37411691ee7 |
parent 47795 | ccb10fe4b955 |
child 47797 | 63152f78e18b |
--- a/Admin/Cygwin/exec_process.c Fri Apr 27 15:59:50 2012 +0200 +++ b/Admin/Cygwin/exec_process.c Fri Apr 27 19:31:03 2012 +0200 @@ -7,7 +7,6 @@ #include <stdio.h> #include <sys/types.h> #include <unistd.h> -#include <process.h> static void fail(const char *msg) @@ -52,8 +51,7 @@ cmd_line[2] = script; cmd_line[3] = NULL; - int pid = spawnv(_P_NOWAIT, "/bin/bash", cmd_line); - if (pid == -1) fail("Bad process"); - waitpid(pid); + execv("/bin/bash", cmd_line); + fail("Cannot exec process"); }