unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21323: start-process rejects .com executables
@ 2015-08-22 17:24 Björn Lindqvist
  2015-08-22 19:21 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Björn Lindqvist @ 2015-08-22 17:24 UTC (permalink / raw)
  To: 21323

I found this bug on windows ver 24.5.1. If you try to run a .com file:

(start-process "X" "Y" "c:/Windows/System32/tree.com")

You get: "Spawning child process: exec format error"

The cryptic error appears to be a result of the .com extension. IIRC
it worked in 23.x so this problem is a regression.


-- 
mvh/best regards Björn Lindqvist





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21323: start-process rejects .com executables
  2015-08-22 17:24 bug#21323: start-process rejects .com executables Björn Lindqvist
@ 2015-08-22 19:21 ` Eli Zaretskii
  2015-08-23 13:06   ` Björn Lindqvist
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2015-08-22 19:21 UTC (permalink / raw)
  To: Björn Lindqvist; +Cc: 21323-done

> Date: Sat, 22 Aug 2015 19:24:00 +0200
> From: Björn Lindqvist <bjourne@gmail.com>
> 
> I found this bug on windows ver 24.5.1. If you try to run a .com file:
> 
> (start-process "X" "Y" "c:/Windows/System32/tree.com")
> 
> You get: "Spawning child process: exec format error"

Indeed.

> The cryptic error appears to be a result of the .com extension.

No, it's because .com programs are run via cmdproxy.exe, and there's a
bug in computing the directory where we look for it.

As a workaround, you can set CMDPROXY in the environment to point to
cmdproxy.exe (should be in libexec/emacs/24.5/i686-pc-mingw32/
subdirectory of the directory where you installed Emacs 24.5).

I've now fixed this for the next release so it will work even without
setting CMDPROXY in the environment.  Thanks.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21323: start-process rejects .com executables
  2015-08-22 19:21 ` Eli Zaretskii
@ 2015-08-23 13:06   ` Björn Lindqvist
  2015-08-23 14:29     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Björn Lindqvist @ 2015-08-23 13:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 21323-done

2015-08-22 21:21 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
>> I found this bug on windows ver 24.5.1. If you try to run a .com file:
>>
>> (start-process "X" "Y" "c:/Windows/System32/tree.com")
>>
>> You get: "Spawning child process: exec format error"
>
> Indeed.
>
>> The cryptic error appears to be a result of the .com extension.
>
> No, it's because .com programs are run via cmdproxy.exe, and there's a
> bug in computing the directory where we look for it.

What is the reason for that? As you know, on modern windowses there is
no difference except for the name between .com and .exe files. If
there was an option for it, I'd set it so my binary is not run through
cmdproxy.exe.

> As a workaround, you can set CMDPROXY in the environment to point to
> cmdproxy.exe (should be in libexec/emacs/24.5/i686-pc-mingw32/
> subdirectory of the directory where you installed Emacs 24.5).
>
> I've now fixed this for the next release so it will work even without
> setting CMDPROXY in the environment.  Thanks.

Thank you for the quick turnaround!

-- 
mvh/best regards Björn Lindqvist





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#21323: start-process rejects .com executables
  2015-08-23 13:06   ` Björn Lindqvist
@ 2015-08-23 14:29     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-08-23 14:29 UTC (permalink / raw)
  To: Björn Lindqvist; +Cc: 21323

> Date: Sun, 23 Aug 2015 15:06:55 +0200
> From: Björn Lindqvist <bjourne@gmail.com>
> Cc: 21323-done@debbugs.gnu.org
> 
> 2015-08-22 21:21 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
> >> I found this bug on windows ver 24.5.1. If you try to run a .com file:
> >>
> >> (start-process "X" "Y" "c:/Windows/System32/tree.com")
> >>
> >> You get: "Spawning child process: exec format error"
> >
> > Indeed.
> >
> >> The cryptic error appears to be a result of the .com extension.
> >
> > No, it's because .com programs are run via cmdproxy.exe, and there's a
> > bug in computing the directory where we look for it.
> 
> What is the reason for that?

We don't know how to distinguish between DOS .com programs and the
other kind.  DOS .com programs must be run via cmdproxy to work around
some subtle problems in running DOS programs from a Windows program
(including, but not limited to, standard I/O redirection and killing
subprocesses).

> As you know, on modern windowses there is
> no difference except for the name between .com and .exe files.

But the user could bring a .com program from DOS, and we have no means
of telling one from the other.

> If there was an option for it, I'd set it so my binary is not run
> through cmdproxy.exe.

Why do you care?  Barring bugs, cmdproxy is transparent to the
programs in invokes.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-23 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22 17:24 bug#21323: start-process rejects .com executables Björn Lindqvist
2015-08-22 19:21 ` Eli Zaretskii
2015-08-23 13:06   ` Björn Lindqvist
2015-08-23 14:29     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).