delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/10/14:21:53

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199706101821.AA140936892@typhoon.rose.hp.com>
Subject: Re: DJGPP runs bogus binaries
To: eldredge AT ap DOT net (Nate Eldredge)
Date: Tue, 10 Jun 1997 11:21:32 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <199706092327.QAA04931@adit.ap.net>; from "Nate Eldredge" at Jun 9, 97 4:27 pm

> with spawn, system, exec or the like, very little checking is done to make
> sure the program is an appropriate executable.
This comes up every once in a while.  DOS does its own checking to 
see if something is an EXE file or not.  If not, it assumes a COM 
file.  No way to check really.  Try renaming files to .com and running
them from command prompt and see what happens.
 
> Isn't protected mode supposed to
> prevent this?)
You probably weren't in protected mode when it crashed.  The switch only 
occurs after you exe loads up.

> I realize this is rather a case of "Don't do that, then", but it would sure
> be nice if bogus binaries were checked for, or at *least* if this problem
> could be documented better. Hopefully others can avoid a similar difficulty.

Every system has problems similar to this.  The GCC make utility for 
cross-compiling isn't that smart.  HPUX typically tries to run 
my dos exes natively, and passes them to bourne shell, which then 
dies miserably.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019