Date: Tue, 4 Jul 2000 08:32:36 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: DJGPP problem executing a script In-Reply-To: <3960DCAC.13929.3BA35B@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 3 Jul 2000, Mark E. wrote: > I received a bug report about 'perldoc' (from the perl distribution) failing > because it has '#!perl' at the top. script_exec in dosexec.c turns 'perl' > into 'c:\djgpp\bin/perl.exe' (depending on your installation of course). > > If I change script_exec to change backslashes to forward slashes before > calling the selected spawn function, perldoc gets 'c:/djgpp/bin/perl.exe' and > everything works. Would a patch to do this conversion be welcome or, as Eli > likes to say, am I missing something? I don't think you miss something, but perhaps I am: why doesn't "c:\djgpp\bin/perl.exe" work? Is it because the script is run from Bash, and Bash takes the backslashes as escapes? And one more thing: djgpp.env forcibly mirrors the backslashes in PATH in its [bash] and [sh] sections, to prevent these very problems. So why does dosexec.c still come up with backslashes? In any case, I don't think that mirroring the backslashes inside script_exec will do any harm. I just would like to understand the problem better.