delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/11/06/17:30:31

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: [Fwd: exec of shell scripts] patch to it
6 Nov 1998 17:30:31 -0800 :
Message-ID: <19981106201952.C14769.cygnus.cygwin32.developers@cygnus.com>
References: <364373AA DOT 336FB2FD AT cityweb DOT de>
Mime-Version: 1.0
To: Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>,
cygwin32-developers AT cygnus DOT com

Applied.  Thanks.

I appreciate the fact that you are supplying patches to bug fixes
rather than just reporting bugs.  It my job a lot easier!

On Fri, Nov 06, 1998 at 11:09:46PM +0100, Corinna Vinschen wrote:
>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 <corinna DOT vinschen AT cityweb DOT de>
>
>	* 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);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019