# HG changeset patch # User wenzelm # Date 1335547863 -7200 # Node ID c37411691ee70166d48146aea6b73bbad84f269e # Parent ccb10fe4b955fa9151009765994342031295565c more direct exec with synchronous exit code; diff -r ccb10fe4b955 -r c37411691ee7 Admin/Cygwin/exec_process.c --- 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 #include #include -#include 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"); }