From: Andrew Crabtree 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 Precedence: bulk > 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.