Message-Id: <199810191028.MAA121498@ieva06.lanet.lv> From: "Andris Pavenis" To: Eli Zaretskii Date: Mon, 19 Oct 1998 12:34:20 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Patch for src/libc/dos/process/dosexec.c CC: djgpp-workers AT delorie DOT com References: <199810190939 DOT LAA34738 AT ieva06 DOT lanet DOT lv> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.01b) Reply-To: djgpp-workers AT delorie DOT com Date sent: Mon, 19 Oct 1998 10:57:23 +0200 (IST) From: Eli Zaretskii Subject: Re: Patch for src/libc/dos/process/dosexec.c > > On Mon, 19 Oct 1998, Andris Pavenis wrote: > > > I think that calling unstubified COFF image as .BAT is at least > > slightly weird and confusing. > > I agree, but it still doesn't mean we should disallow it without a good > reason. IMHO, users should be entitled to do whatever they want unless > supporting that would be unfeasible. > > > Think about trying to run it by error from from COMMAND.COM > > dosexec already supports running all kind of executables which cannot be > run directly from COMMAND.COM, like coff-go32-exe images without the .exe > extension. Unix Makefiles need that. > > > It also means that all other previous detection is useless as all files > > will be executed will be executed using go32_exec() when LFN > > support is being used (adding extension "" matches all files). > > I agree that since we have _check_v2_program, we could clean up dosexec > quite a bit, and not rely on the extensions so much. > I see 2 possibilities: - adding one more extension "." (together with "") for unstubified COFF. That extension does not have this problem and it will be possible to run it even with weird extensions. However this may cause problems with make if somebody will try to use such filenames from make. However this is not only possible cause of similar problems in DOS as there are other unusable filenames (e.g. "prn") - patching only go32_exec() as suggested earlier (I don't like that and I'll perhaps keep my old patch currently before some new version will be released). I including patch here -------------------------------------------------- *** dosexec.c~ Sun Jul 26 13:31:34 1998 --- dosexec.c Mon Oct 19 11:09:00 1998 *************** *** 539,545 **** /* Non-DJGPP programs cannot be run by !proxy. */ if (!is_coff) { ! return direct_exec(program, argv, envp); } if (found_si) --- 539,548 ---- /* Non-DJGPP programs cannot be run by !proxy. */ if (!is_coff) { ! if (type->exec_format == _V2_EXEC_FORMAT_EXE) ! return direct_exec(program, argv, envp); ! else ! return __dosexec_command_exec (program, argv, envp); } if (found_si) -------------------------------------------------- Andris