search bash via PATH as usual (this is no longer restricted to Cygwin with its known file-system layout);
authorwenzelm
Mon, 24 Sep 2012 16:27:48 +0200
changeset 49551 9b12fcd0a889
parent 49550 0a82e98fd4a3
child 49552 30fe027a18bd
search bash via PATH as usual (this is no longer restricted to Cygwin with its known file-system layout);
Admin/exec_process/exec_process.c
--- a/Admin/exec_process/exec_process.c	Mon Sep 24 16:13:56 2012 +0200
+++ b/Admin/exec_process/exec_process.c	Mon Sep 24 16:27:48 2012 +0200
@@ -46,12 +46,12 @@
   /* exec */
 
   char *cmd_line[4];
-  cmd_line[0] = "/bin/bash";
+  cmd_line[0] = "bash";
   cmd_line[1] = "-c";
   cmd_line[2] = script;
   cmd_line[3] = NULL;
 
-  execv("/bin/bash", cmd_line);
+  execvp(cmd_line[0], cmd_line);
   fail("Cannot exec process");
 }