From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen) Subject: [Fwd: exec of shell scripts] patch to it 6 Nov 1998 14:45:47 -0800 Message-ID: <364373AA.336FB2FD.cygnus.cygwin32.developers@cityweb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: cygwin32-developers AT cygnus DOT com In gnu-win32 AT cygnus DOT com marc_auslander AT us DOT ibm DOT com wrote: > > The readme's indicate a change in shell script handling - they say that #! > is now honored. > > However, it appears that scripts with NO #! no longer work at all. > > Similarly, scripts with a relative name after #! do not work, even thought > the name is in the path. I think, I have found the solution for the problem. In the file `spawn.cc', the function `spawn_guts()' calls the function `find_exec()' in an incorrect way. It works now in my environment. Regards, Corinna ChangeLog: ---------- Fri Nov 06 22:40:13 1998 Corinna Vinschen * spawn.cc (spawn_guts): Fixed the call to `find_exec()'. ----snip ---- --- spawn.cc.orig Fri Nov 06 22:40:13 1998 +++ spawn.cc Fri Nov 06 23:05:33 1998 @@ -351,7 +351,7 @@ spawn_guts (HANDLE hToken, const char * * arg1 optional string * ptr end of string */ - find_exec (pgm, (char *) prog_arg1, ext); + find_exec (pgm, (char *) prog_arg1, "PATH=", 0, &ext); char *f = (char *) alloca (strlen (copy) + strlen (prog_arg) + strlen (real_path) + (ptr - arg1) + 7); strcpy (f, prog_arg1);