Date: Sun, 18 Oct 1998 13:52:44 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Andris Pavenis cc: djgpp-workers AT delorie DOT com, dj AT delorie DOT com Subject: Re: Patch for src/libc/dos/process/dosexec.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com On Sat, 17 Oct 1998, Andris Pavenis wrote: > we should SKIP additional extension when it is "" to > avoid BAT file (or some script) missinterpretted as > unstubbed COFF. Thanks for the patch. However, I'm not sure this is the right thing to do to correct the bug. This patch loses when foo.bat *is* an unstubified COFF image (or, in fact, anything other than a batch file). Preventing users from being able to have a file with a .bat extension that isn't a batch file is a subtle restriction that shouldn't be introduced with no good reason, IMHO. I think a better way to correct this bug would be to change go32_exec function (which gets called by the original version of dosexec.c for this case) so that a file that is neither a V2 executable, nor a shell script, and doesn't have the DOS MZ signature (use the _V2_EXEC_FORMAT_EXE macro with the value returned by _check_v2_prog), is passed to __dosexec_command_exec (instead of direct_exec in the original code). This is analogous to the handling of .sh, .pl, .sed etc. files, so why make a special treatment for a .bat file? Andris, could you please try this alternative solution and see if it works?