Mail Archives: djgpp-workers/1998/10/19/05:35:29
Date sent: Mon, 19 Oct 1998 10:57:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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
- Raw text -